BiGuan commited on
Commit
6347a82
·
verified ·
1 Parent(s): 7373d79

Update tools/visit_webpage.py

Browse files
Files changed (1) hide show
  1. tools/visit_webpage.py +0 -2
tools/visit_webpage.py CHANGED
@@ -6,7 +6,6 @@ tools/visit_webpage.py —— 工具③:打开并阅读一个网页
6
 
7
  import re
8
  import time
9
- from langchain_core.tools import tool
10
  import requests
11
  from bs4 import BeautifulSoup
12
 
@@ -16,7 +15,6 @@ USER_AGENTS = [
16
  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
17
  ]
18
 
19
- @tool
20
  def visit_webpage(url: str) -> str:
21
  """
22
  Fetch a web page, extract its main text content, and return as plain text.
 
6
 
7
  import re
8
  import time
 
9
  import requests
10
  from bs4 import BeautifulSoup
11
 
 
15
  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
16
  ]
17
 
 
18
  def visit_webpage(url: str) -> str:
19
  """
20
  Fetch a web page, extract its main text content, and return as plain text.