Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,20 @@ def sum_tool(a: float, b: float) -> float:
|
|
| 22 |
"""
|
| 23 |
return a + b
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
@tool
|
| 26 |
def sub_tool(a: float, b: float) -> float:
|
| 27 |
"""
|
|
@@ -43,7 +57,7 @@ model = LiteLLMModel(
|
|
| 43 |
)
|
| 44 |
|
| 45 |
agent = ToolCallingAgent(
|
| 46 |
-
tools=[sum_tool, sub_tool, PythonInterpreterTool()],
|
| 47 |
model=model,
|
| 48 |
max_steps=3
|
| 49 |
)
|
|
|
|
| 22 |
"""
|
| 23 |
return a + b
|
| 24 |
|
| 25 |
+
@tool
|
| 26 |
+
def multiply_tool(a: float, b: float) -> float:
|
| 27 |
+
"""
|
| 28 |
+
Returns the product of two numbers.
|
| 29 |
+
|
| 30 |
+
Args:
|
| 31 |
+
a (float): The first value.
|
| 32 |
+
b (float): The second value.
|
| 33 |
+
|
| 34 |
+
Returns:
|
| 35 |
+
float: Product of a and b
|
| 36 |
+
"""
|
| 37 |
+
return a * b
|
| 38 |
+
|
| 39 |
@tool
|
| 40 |
def sub_tool(a: float, b: float) -> float:
|
| 41 |
"""
|
|
|
|
| 57 |
)
|
| 58 |
|
| 59 |
agent = ToolCallingAgent(
|
| 60 |
+
tools=[sum_tool, sub_tool, multiply_tool, PythonInterpreterTool()],
|
| 61 |
model=model,
|
| 62 |
max_steps=3
|
| 63 |
)
|