File size: 267 Bytes
8950c51
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from langchain_core.tools import tool


@tool
def divide(a: int, b: int) -> int:
    """Divide two numbers.



    Args:

        a: first int

        b: second int

    """
    if b == 0:
        raise ValueError("Cannot divide by zero.")
    return a / b