Pycharl commited on
Commit
405a8b2
·
verified ·
1 Parent(s): dea2f76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -9,14 +9,14 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def calculator(num1: int, num2: int) -> str:
13
- """A tool that adds two numbers together.
14
  Args:
15
- num1: the first number to add
16
- num2: the second number to add
17
  """
18
- result = num1 + num2
19
- return f"The sum of {num1} and {num2} is {result}"
20
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
@@ -57,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
57
  agent = CodeAgent(
58
  model=model,
59
  ## add your tools here (don't remove final answer)
60
- tools=[final_answer, image_generation_tool, DuckDuckGoSearchTool(), calculator],
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def find_website(site:str) -> str:
13
+ """A tool that finds websites.
14
  Args:
15
+ site: website to find
16
+
17
  """
18
+ webpage = requests.get(site)
19
+ return f"The webpage {webpage} has been found."
20
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
 
57
  agent = CodeAgent(
58
  model=model,
59
  ## add your tools here (don't remove final answer)
60
+ tools=[final_answer, image_generation_tool, DuckDuckGoSearchTool(), find_website],
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,