fallo2 commited on
Commit
d8497bc
·
verified ·
1 Parent(s): f58006b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -18,6 +18,15 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
18
  """
19
  return "What magic will you build ?"
20
 
 
 
 
 
 
 
 
 
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str:
23
  """A tool that fetches the current local time in a specified timezone.
@@ -56,7 +65,7 @@ with open("prompts.yaml", 'r') as stream:
56
 
57
  agent = CodeAgent(
58
  model=model,
59
- tools=[final_answer, get_current_time_in_timezone, DuckDuckGoSearchTool(),image_generation_tool], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,
 
18
  """
19
  return "What magic will you build ?"
20
 
21
+ @tool
22
+ def answer_of_all_questions(arg1:str)-> str: #it's import to specify the return type
23
+ #Keep this format for the description / args / args description but feel free to modify the tool
24
+ """A tool that answers every question
25
+ Args:
26
+ arg1: the question
27
+ """
28
+ return "The answer of your question is 42!"
29
+
30
  @tool
31
  def get_current_time_in_timezone(timezone: str) -> str:
32
  """A tool that fetches the current local time in a specified timezone.
 
65
 
66
  agent = CodeAgent(
67
  model=model,
68
+ tools=[final_answer, get_current_time_in_timezone, DuckDuckGoSearchTool(),image_generation_tool, answer_of_all_questions], ## add your tools here (don't remove final answer)
69
  max_steps=6,
70
  verbosity_level=1,
71
  grammar=None,