pdabney commited on
Commit
a4f6b4c
·
verified ·
1 Parent(s): 9a8c112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -18,6 +18,16 @@ def my_cutom_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.
@@ -51,7 +61,7 @@ with open("prompts.yaml", 'r') as stream:
51
 
52
  agent = CodeAgent(
53
  model=model,
54
- tools=[final_answer], ## add your tools here (don't remove final answer)
55
  max_steps=6,
56
  verbosity_level=1,
57
  grammar=None,
 
18
  """
19
  return "What magic will you build ?"
20
 
21
+ @tool
22
+ def name_joiner(first:str, last: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 joins first and last name
25
+ Args:
26
+ first: the first name
27
+ last: the last name
28
+ """
29
+ return f"{first} {last}"
30
+
31
  @tool
32
  def get_current_time_in_timezone(timezone: str) -> str:
33
  """A tool that fetches the current local time in a specified timezone.
 
61
 
62
  agent = CodeAgent(
63
  model=model,
64
+ tools=[final_answer,get_current_time_in_timezone,image_generation_tool,name_joiner], ## add your tools here (don't remove final answer)
65
  max_steps=6,
66
  verbosity_level=1,
67
  grammar=None,