Spaces:
Sleeping
Sleeping
add custom tool to the list
Browse files
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
|
| 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,
|