Spaces:
Sleeping
Sleeping
Delete math_tools.py
Browse files- math_tools.py +0 -52
math_tools.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
| 1 |
-
from langchain_core.tools import tool
|
| 2 |
-
|
| 3 |
-
@tool
|
| 4 |
-
def multiply(a: int, b: int) -> int:
|
| 5 |
-
"""Multiply two numbers.
|
| 6 |
-
Args:
|
| 7 |
-
a: first int
|
| 8 |
-
b: second int
|
| 9 |
-
"""
|
| 10 |
-
return a * b
|
| 11 |
-
|
| 12 |
-
@tool
|
| 13 |
-
def add(a: int, b: int) -> int:
|
| 14 |
-
"""Add two numbers.
|
| 15 |
-
|
| 16 |
-
Args:
|
| 17 |
-
a: first int
|
| 18 |
-
b: second int
|
| 19 |
-
"""
|
| 20 |
-
return a + b
|
| 21 |
-
|
| 22 |
-
@tool
|
| 23 |
-
def subtract(a: int, b: int) -> int:
|
| 24 |
-
"""Subtract two numbers.
|
| 25 |
-
|
| 26 |
-
Args:
|
| 27 |
-
a: first int
|
| 28 |
-
b: second int
|
| 29 |
-
"""
|
| 30 |
-
return a - b
|
| 31 |
-
|
| 32 |
-
@tool
|
| 33 |
-
def divide(a: int, b: int) -> int:
|
| 34 |
-
"""Divide two numbers.
|
| 35 |
-
|
| 36 |
-
Args:
|
| 37 |
-
a: first int
|
| 38 |
-
b: second int
|
| 39 |
-
"""
|
| 40 |
-
if b == 0:
|
| 41 |
-
raise ValueError("Cannot divide by zero.")
|
| 42 |
-
return a / b
|
| 43 |
-
|
| 44 |
-
@tool
|
| 45 |
-
def modulus(a: int, b: int) -> int:
|
| 46 |
-
"""Get the modulus of two numbers.
|
| 47 |
-
|
| 48 |
-
Args:
|
| 49 |
-
a: first int
|
| 50 |
-
b: second int
|
| 51 |
-
"""
|
| 52 |
-
return a % b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|