Unit4-GAIA / tools /modulus.py
Romain Lembo
Add mathematical tools: modulus, power, subtract, and square root
fc9e2f8
raw
history blame
228 Bytes
from langchain_core.tools import tool
@tool
def modulus(a: int, b: int) -> int:
"""
Get the modulus of two numbers.
Args:
a (int): the first number
b (int): the second number
"""
return a % b