Skip to content
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

langgraph: add support for BaseModel updates to Command #2747

Merged
merged 10 commits into from
Jan 23, 2025

Conversation

larsenweigle
Copy link
Contributor

@larsenweigle larsenweigle commented Dec 12, 2024

Simple update that adds support for the update attribute of the Command class to support Pydantic BaseModel type.

LangGraph already supports Pydantic models for graph states.

Extending support to the update attribute allows users to pass custom BaseModel instances. Additionally, updates defined as BaseModel types are type-validated when created.

#2804

@larsenweigle
Copy link
Contributor Author

tagging @nfcampos as a relevant maintainer

@larsenweigle
Copy link
Contributor Author

larsenweigle commented Dec 13, 2024

I was having a hard time finding the pr template mentioned here. Happy to make any additional changes to the pr as needed.

I also opened a discussion here

vbarda added a commit that referenced this pull request Dec 16, 2024
@larsenweigle larsenweigle changed the title update attribute of Command class supports BaseModel type update attribute of Command support for BaseModel type Dec 16, 2024
@vbarda vbarda marked this pull request as ready for review January 21, 2025 14:46
@vbarda vbarda changed the title update attribute of Command support for BaseModel type langgraph: add support for BaseModel updates to Command Jan 21, 2025
@vbarda vbarda merged commit 3955225 into langchain-ai:main Jan 23, 2025
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants