cyberosa commited on
Commit
36e1062
·
1 Parent(s): 7e19ad6

fix missing import

Browse files
Files changed (1) hide show
  1. tools/visit_webpage.py +5 -1
tools/visit_webpage.py CHANGED
@@ -3,11 +3,15 @@ from smolagents.tools import Tool
3
  import requests
4
  import markdownify
5
  import smolagents
 
 
6
 
7
  class VisitWebpageTool(Tool):
8
  name = "visit_webpage"
9
  description = "Visits a webpage at the given url and reads its content as a markdown string. Use this to browse webpages."
10
- inputs = {'url': {'type': 'string', 'description': 'The url of the webpage to visit.'}}
 
 
11
  output_type = "string"
12
 
13
  def forward(self, url: str) -> str:
 
3
  import requests
4
  import markdownify
5
  import smolagents
6
+ import re
7
+
8
 
9
  class VisitWebpageTool(Tool):
10
  name = "visit_webpage"
11
  description = "Visits a webpage at the given url and reads its content as a markdown string. Use this to browse webpages."
12
+ inputs = {
13
+ "url": {"type": "string", "description": "The url of the webpage to visit."}
14
+ }
15
  output_type = "string"
16
 
17
  def forward(self, url: str) -> str: