Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ from Gradio_UI import GradioUI
|
|
| 12 |
|
| 13 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 14 |
@tool
|
| 15 |
-
def
|
| 16 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 17 |
"""A tool that fetches information regarding a stock ticker from Yahoo Finance
|
| 18 |
Args:
|
|
@@ -58,7 +58,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 58 |
|
| 59 |
agent = CodeAgent(
|
| 60 |
model=model,
|
| 61 |
-
tools=[get_current_time_in_timezone, image_generation_tool, web_search, visit_webpage, final_answer], ## add your tools here (don't remove final answer)
|
| 62 |
max_steps=6,
|
| 63 |
verbosity_level=1,
|
| 64 |
grammar=None,
|
|
|
|
| 12 |
|
| 13 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 14 |
@tool
|
| 15 |
+
def yfinance_tool(ticker:str)-> str: #it's import to specify the return type
|
| 16 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 17 |
"""A tool that fetches information regarding a stock ticker from Yahoo Finance
|
| 18 |
Args:
|
|
|
|
| 58 |
|
| 59 |
agent = CodeAgent(
|
| 60 |
model=model,
|
| 61 |
+
tools=[yfinance_tool, get_current_time_in_timezone, image_generation_tool, web_search, visit_webpage, final_answer], ## add your tools here (don't remove final answer)
|
| 62 |
max_steps=6,
|
| 63 |
verbosity_level=1,
|
| 64 |
grammar=None,
|