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

update attribute of Command class supports BaseModel type #2747

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

larsenweigle
Copy link

@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.

@larsenweigle
Copy link
Author

tagging @nfcampos as a relevant maintainer

@larsenweigle
Copy link
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

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.

1 participant