-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
prebuilt: allow pydantic model as state schema in create_react_agent #3559
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Thanks for the contribution @ianchi! Would you mind adding a test for this, please? |
Hi @benjamincburns, I updated the PR and added the test, but I've run into a problem. It seems that the state that the conditional edge receives is not the full state (but the one in the source node?), so it cannot inject it correctly on the tool. I don't know if this can be "fixed" somehow. |
Inherited attributes where not considered.
Hi @benjamincburns, I found a "fix" for the v2 problem. Anyhow is more of a hack than a good fix. Although I couldn't find it clearly in the documentation it seems that currently in Langgraph:
I couldn't find any other more elegant solution, given these conditions. |
@ianchi thanks for the contribution - i pushed a bunch of updates -- let me know if you have any comments, otherwise will merge shortly |
Inherited attributes where not considered.
Pydantic model can inherit from other pydantic models. In those cases, inherited attributes where not considered in the check and the code fails.