Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 17 |
arg2: the second argument
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
-
|
| 21 |
def add(a:int, b:int)-> int:
|
| 22 |
"""A tool that adds two intergers
|
| 23 |
Args:
|
|
@@ -63,7 +63,13 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 63 |
|
| 64 |
agent = CodeAgent(
|
| 65 |
model=model,
|
| 66 |
-
tools=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
max_steps=6,
|
| 68 |
verbosity_level=1,
|
| 69 |
grammar=None,
|
|
|
|
| 17 |
arg2: the second argument
|
| 18 |
"""
|
| 19 |
return "What magic will you build ?"
|
| 20 |
+
@tool
|
| 21 |
def add(a:int, b:int)-> int:
|
| 22 |
"""A tool that adds two intergers
|
| 23 |
Args:
|
|
|
|
| 63 |
|
| 64 |
agent = CodeAgent(
|
| 65 |
model=model,
|
| 66 |
+
tools=[
|
| 67 |
+
final_answer,
|
| 68 |
+
add,
|
| 69 |
+
my_custom_tool,
|
| 70 |
+
get_current_time_in_timezone,
|
| 71 |
+
image_generation_tool
|
| 72 |
+
], ## add your tools here (don't remove final answer)
|
| 73 |
max_steps=6,
|
| 74 |
verbosity_level=1,
|
| 75 |
grammar=None,
|