-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The agent does not use tool to make response? #766
Comments
Hi @2500035435, Apologies we haven't updated the docs in a while. The recommended way to create agents currently is using langgraph. LangServe at the moment doesn't help with deployment of langgraph primitives, but you should be able to set up vanilla FastAPI deployment pretty quickly. Eugene |
@eyurtsev Hi, just to confirm,
Ivan |
The langgraph RAG agent is just as simple: https://python.langchain.com/docs/tutorials/qa_chat_history/#tying-it-together-1 LangServe may just not work for deploying it since it's not aware of langgraph constructs. If you have working code and it's good, then keep it as is -- no reason to change. If you're writing new code:
LangServe is designed to work for runnable constructed using LCEL (this includes the old LangChain AgentExecutor) In the example above there's likely some issue in the code (e.g., using a deprecated function calling API from openai or maybe some issue with the system prompt) -- so this isn't so much a deployment question, but a question of whether the agent code is correct |
I refer to https://github.com/langchain-ai/langserve/blob/main/examples/agent/server.py to build my own RAG agent.
test code as follows:
Then I make query in client:
chain verbose as follows:
I notice that agent didn't use tool to make RAG, just directly response.
Did I miss anything? I am stuck here.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: