J3 commited on
Commit
4ab1258
·
verified ·
1 Parent(s): 1252408

add custom tool to the list

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
19
  return "What magic will you build ?"
20
 
21
  @tool
22
- def get_tomorrows_prediction(zodiac_sign: str) -> str:
23
  """A tool that fetches tomorrows horoscope prediction given a zodiac sign.
24
  Args:
25
  zodiac_sign: A string representing a zodiac sign (e.g., 'leo').
@@ -85,7 +85,7 @@ with open("prompts.yaml", 'r') as stream:
85
 
86
  agent = CodeAgent(
87
  model=model,
88
- tools=[final_answer], ## add your tools here (don't remove final answer)
89
  max_steps=6,
90
  verbosity_level=1,
91
  grammar=None,
 
19
  return "What magic will you build ?"
20
 
21
  @tool
22
+ def get_horoscope(zodiac_sign: str) -> str:
23
  """A tool that fetches tomorrows horoscope prediction given a zodiac sign.
24
  Args:
25
  zodiac_sign: A string representing a zodiac sign (e.g., 'leo').
 
85
 
86
  agent = CodeAgent(
87
  model=model,
88
+ tools=[final_answer, get_horoscope], ## add your tools here (don't remove final answer)
89
  max_steps=6,
90
  verbosity_level=1,
91
  grammar=None,