15 lines
239 B
Python
15 lines
239 B
Python
from langchain_core.tools import tool
|
|
|
|
|
|
@tool
|
|
def add(a: int, b: int) -> int:
|
|
"""Adds a and b."""
|
|
return a + b
|
|
|
|
|
|
@tool
|
|
def multiply(a: int, b: int) -> int:
|
|
"""Multiplies a and b."""
|
|
return a * b
|
|
|
|
all_tools = [add, multiply] |