Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,12 @@ def get_stock_answer(eur:int,usd:int) -> int:
|
|
| 42 |
"""
|
| 43 |
return eur*usd
|
| 44 |
|
|
|
|
|
|
|
| 45 |
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
final_answer = FinalAnswerTool()
|
| 48 |
|
|
@@ -65,7 +70,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 65 |
|
| 66 |
agent = CodeAgent(
|
| 67 |
model=model,
|
| 68 |
-
tools=[final_answer,get_stock_answer], ## add your tools here (don't remove final answer)
|
| 69 |
max_steps=6,
|
| 70 |
verbosity_level=1,
|
| 71 |
grammar=None,
|
|
|
|
| 42 |
"""
|
| 43 |
return eur*usd
|
| 44 |
|
| 45 |
+
@tool
|
| 46 |
+
def greeting()-> str: #it's import to specify the return type
|
| 47 |
|
| 48 |
+
"""if user say hello or greet this tool that return greeting
|
| 49 |
+
"""
|
| 50 |
+
return "Hello i am ana i would like to help you"
|
| 51 |
|
| 52 |
final_answer = FinalAnswerTool()
|
| 53 |
|
|
|
|
| 70 |
|
| 71 |
agent = CodeAgent(
|
| 72 |
model=model,
|
| 73 |
+
tools=[final_answer,get_stock_answer,greeting], ## add your tools here (don't remove final answer)
|
| 74 |
max_steps=6,
|
| 75 |
verbosity_level=1,
|
| 76 |
grammar=None,
|