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

@tool
def product_quantity_check(product_name: str, quantity: int) -> str:
    """Check the quantity of a product in the supply chain."""
    return {
        "dialog_state": ["Supply_Chain_Management"],
        "messages": [
            {
                "type": "text",
                "content": f"The quantity of {product_name} is {quantity}."
            }
        ]
    }