Access chat History from a tool #1091
-
I have a tool that does search from an inventory of products/services available in a store class RecommendServiceInput(BaseModel):
chat_history: str = Field("the chat history between an ai and a visitor")
def recommend_service(chat_history: str): My tool can then run a customized few shot template to extract the query from.. and them run it However: The above approach is inconsistent.
Is there a more reliable way for me to access the chat history inside a tool? Any guidance would be greatly appreciated.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Does this help? https://langchain-ai.github.io/langgraph/how-tos/pass-run-time-values-to-tools/ I think it will depend on the next release 0.0.10 to be done today |
Beta Was this translation helpful? Give feedback.
Does this help? https://langchain-ai.github.io/langgraph/how-tos/pass-run-time-values-to-tools/
I think it will depend on the next release 0.0.10 to be done today