tools.py
This file needs to contain anything related to creating the tools for your agent. That includes each tool’s definition, and the TOOLS dictionary.
from langchain.tools import tool
@tool
def cancel_order(order_id: str) -> str:
"""Cancel an order that has not shipped."""
return f"Cancel order {order_id}."
TOOLS = {
"cancel_order": cancel_order
}
|
Any tools you define for the model should also be added to the |