adam573 commited on
Commit
3768e79
·
verified ·
1 Parent(s): 2f4c2f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -10
app.py CHANGED
@@ -8,20 +8,16 @@ from tools.web_search import DuckDuckGoSearchTool as DuckTool
8
 
9
  from Gradio_UI import GradioUI
10
 
11
- # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
14
- #Keep this format for the description / args / args description but feel free to modify the tool
15
- """A tool that does nothing yet
16
  Args:
17
- arg1: the first argument
18
- arg2: the second argument
19
  """
20
- return "What magic will you build ?"
21
-
22
 
23
 
24
-
25
  @tool
26
  def get_current_time_in_timezone(timezone: str) -> str:
27
  """A tool that fetches the current local time in a specified timezone.
@@ -63,7 +59,7 @@ with open("prompts.yaml", 'r') as stream:
63
 
64
  agent = CodeAgent(
65
  model=model,
66
- tools=[research_tool, image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
67
  max_steps=6,
68
  verbosity_level=1,
69
  grammar=None,
 
8
 
9
  from Gradio_UI import GradioUI
10
 
11
+
12
  @tool
13
+ def dev_jokes(jokes:[str])-> str: #it's import to specify the return type
14
+ """A tool that takes a list of dev jokes ad just display them to the user
 
15
  Args:
16
+ jokes: A list of jokes
 
17
  """
18
+ return "Hey, see what i've found, you will like it : "+ jokes
 
19
 
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.
 
59
 
60
  agent = CodeAgent(
61
  model=model,
62
+ tools=[research_tool, dev_jokes, final_answer], ## add your tools here (don't remove final answer)
63
  max_steps=6,
64
  verbosity_level=1,
65
  grammar=None,