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

Module:04-Subgraphs: Pass state_schema in StateGraph of subgraphs instead of input, to remove deprecation warning. #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rehan-ul-haq
Copy link

Failure_analysis_state

Problem

Currently, input and output schema is passed in subgraphs which raises LangGraphDeprecationWarning as mentioned below.
"LangGraphDeprecationWarning: Initializing StateGraph without state_schema is deprecated. Please pass in an explicit state_schema instead of just an input and output schema.
fa_builder = StateGraph(input=FailureAnalysisState,output=FailureAnalysisOutputState)"

Solution

The same schema is passed as state_schema rather than input and it removed the deprecation warning. Moreover, passing FailureAnalysisState and QuestionSummarizationState as state_schema (overall state) rather than input schema, seems more intuitive.

Testing

  • Ran the notebook and received the response as expectedquestion_summarization_state

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