DiegoSanC
refactor: :recycle: Move langgraph solution to langgraph folder as it is not working properly
d4598ef
from langchain_core.tools import tool
@tool
def add(a: int, b: int) -> int:
#Google docstring style
"""
Add two numbers together
Args:
a: The first number
b: The second number
Returns:
The sum of the two numbers
"""
return a + b
@tool
def subtract(a: int, b: int) -> int:
"""
Subtract two numbers
Args:
a: The first number
b: The second number
Returns:
The difference between the two numbers
"""
return a - b
@tool
def multiply(a: int, b: int) -> int:
"""
Multiply two numbers
Args:
a: The first number
b: The second number
Returns:
The product of the two numbers
"""
return a * b
@tool
def divide(a: int, b: int) -> float:
"""
Divide two numbers
Args:
a: The first number
b: The second number
Returns:
The quotient of the two numbers
"""
return a / b
@tool
def modulo(a: int, b: int) -> int:
"""
Calculate the modulo of two numbers
Args:
a: The first number
b: The second number
Returns:
The remainder of the division of the two numbers
"""
return a % b