Update sample code for: LangGraph Tutorial: Build Stateful AI Agents in Python#784
Open
martin-martin wants to merge 2 commits into
Open
Update sample code for: LangGraph Tutorial: Build Stateful AI Agents in Python#784martin-martin wants to merge 2 commits into
martin-martin wants to merge 2 commits into
Conversation
…in Python Refresh the LangGraph companion code for the tutorial update: - Bump to langgraph 1.2.5, langchain-openai 1.3.2, langchain-core 1.4.7, pydantic 2.13.4 (regenerated requirements.txt; pyproject floors raised) - Switch the model to gpt-5.4-nano - Fix check_escalation_status_node to fall back to 0 when no fine is extracted (avoids a TypeError on notices without a max potential fine) - Store the boolean answer.is_true in follow_ups (was storing the model object) - Drop the unused critical_fields_missing key from the agent's initial state - Point the README API-key link at platform.openai.com/api-keys and match the new tutorial title Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The companion emails still used 2024/2025 dates while the tutorial's examples and REPL transcripts use 2026. Update Email 0 (May 15 / June 10, 2026) and Email 3 (June 10 / August 5, 2026) so extracted dates match the tutorial output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Where to put new files:
my-awesome-articleHow to merge your changes:
Updates the existing
python-langgraph/companion code for the LangGraph Tutorial: Build Stateful AI Agents in Python tutorial refresh.Changes
langgraph1.2.5,langchain-openai1.3.2,langchain-core1.4.7,pydantic2.13.4 (regeneratedrequirements.txt; raisedpyproject.tomlfloors)gpt-5.4-nanocheck_escalation_status_nodeto fall back to0when no fine is extracted (avoids aTypeErroron notices without a max potential fine)answer.is_trueinfollow_ups(was storing the model object, violating thedict[str, bool]type)critical_fields_missingkey from the agent's initial stateplatform.openai.com/api-keysand align the README titleVerified end-to-end against OpenAI on Python 3.12 and 3.14 with the pinned
requirements.txt(structured output, the escalation/no-fine path, the follow-up cycle, and the agent).ruff format/ruff check(v0.14.1) pass.