jbo-tech commited on
Commit
84fab11
·
verified ·
1 Parent(s): f54a230

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,7 +10,7 @@ from Gradio_UI import GradioUI
10
  import json
11
 
12
  @tool
13
- def website_info(url:str)-> str:
14
  """A tool that gets info from a website
15
  Args :
16
  url: The url you want to get info from
@@ -18,7 +18,7 @@ def website_info(url:str)-> str:
18
  api = 'https://api.microlink.io'
19
  params = {'url': url}
20
  response = requests.get(api, params)
21
- return json.dumps(response.json())
22
 
23
  @tool
24
  def get_current_time_in_timezone(timezone: str) -> str:
@@ -57,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
57
 
58
  agent = CodeAgent(
59
  model=model,
60
- tools=[final_answer, asciify_text, website_info, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,
 
10
  import json
11
 
12
  @tool
13
+ def website_info(url: str) -> str:
14
  """A tool that gets info from a website
15
  Args :
16
  url: The url you want to get info from
 
18
  api = 'https://api.microlink.io'
19
  params = {'url': url}
20
  response = requests.get(api, params)
21
+ return response
22
 
23
  @tool
24
  def get_current_time_in_timezone(timezone: str) -> str:
 
57
 
58
  agent = CodeAgent(
59
  model=model,
60
+ tools=[final_answer, website_info, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,