File size: 567 Bytes
dfe7463 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
When using the @tool decorator from langchain_core.tools, the function must either:
- Have a docstring that describes what the tool does, or
- Provide an explicit description parameter to the decorator.
@tool
def RAG(state):
"""Use this tool to execute RAG. If the question is related to Japan or Sports, this tool retrieves the results."""
@tool(description="Use this tool to execute RAG. Retrieves results related to Japan or Sports.")
def RAG(state):
# Clear ChromaDB cache to fix tenant issue
chromadb.api.client.SharedSystemClient.clear_system_cache() |