Ghisalbertifederico commited on
Commit
f6ee85e
·
verified ·
1 Parent(s): 1f29de6

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +2 -2
tools.py CHANGED
@@ -96,7 +96,7 @@ def visit_webpage(url: str) -> str:
96
  url: The URL to fetch.
97
 
98
  Returns:
99
- The main text content of the page, truncated to ~40k chars.
100
  """
101
  print(f"[TOOL] visit_webpage: {url}")
102
  try:
@@ -108,7 +108,7 @@ def visit_webpage(url: str) -> str:
108
  resp.raise_for_status()
109
  text = markdownify.markdownify(resp.text, strip=["img", "script", "style"])
110
  text = re.sub(r'\n{3,}', '\n\n', text).strip()
111
- return text[:40_000]
112
  except Exception as e:
113
  print(f"[TOOL] visit_webpage error: {e}")
114
  return f"Could not fetch {url}: {e}"
 
96
  url: The URL to fetch.
97
 
98
  Returns:
99
+ The main text content of the page, truncated to ~80k chars.
100
  """
101
  print(f"[TOOL] visit_webpage: {url}")
102
  try:
 
108
  resp.raise_for_status()
109
  text = markdownify.markdownify(resp.text, strip=["img", "script", "style"])
110
  text = re.sub(r'\n{3,}', '\n\n', text).strip()
111
+ return text[:80_000]
112
  except Exception as e:
113
  print(f"[TOOL] visit_webpage error: {e}")
114
  return f"Could not fetch {url}: {e}"