2MoOn24mOoN4 commited on
Commit
0bec91d
·
verified ·
1 Parent(s): 25ab983

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +1 -1
agent.py CHANGED
@@ -95,7 +95,7 @@ def CustomVisitWebpageTool(query: str) -> str:
95
  soup = BeautifulSoup(response.text, 'html.parser')
96
  # Extract text from the webpage
97
  text = soup.get_text(separator=' ', strip=True)
98
- return text[:1000] # Limit output length to avoid overload
99
  except Exception as e:
100
  print(f"Error in VisitWebpageTool: {e}")
101
  return f"Webpage access error: {e}"
 
95
  soup = BeautifulSoup(response.text, 'html.parser')
96
  # Extract text from the webpage
97
  text = soup.get_text(separator=' ', strip=True)
98
+ return text[:100] # Limit output length to avoid overload
99
  except Exception as e:
100
  print(f"Error in VisitWebpageTool: {e}")
101
  return f"Webpage access error: {e}"