# tools.py
from langchain.tools import tool
# create support ticket tool
@tool
def create_support_ticket(customer_name: str, issue: str) -> str:
"""Create a support ticket for issues that cannot be resolve using the other tools."""
return f"Support ticket created for {customer_name}."
# get order status tool
@tool
def get_order_status(order_id: str) -> str:
"""Get the status of an order."""
return f"Check status of order {order_id}."
# cancel orders tool
@tool
def cancel_order(order_id: str) -> str:
"""Cancel an order that has not shipped."""
return f"Cancel order {order_id}."
# dictionary
TOOLS = {
"create_support_ticket": create_support_ticket,
"get_order_status": get_order_status,
"cancel_order": cancel_order
}