Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/oss/langgraph/thinking-in-langgraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ We'll implement each node as a simple function. Remember: nodes take state, do w
from langchain_openai import ChatOpenAI
from langchain.messages import HumanMessage

llm = ChatOpenAI(model="gpt-4")
llm = ChatOpenAI(model="gpt-5-nano")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpt-4 could not reliably return valid JSON, causing classify_intent to fail.


def read_email(state: EmailAgentState) -> dict:
"""Extract and parse email content"""
Expand Down Expand Up @@ -974,7 +974,7 @@ initial_state = {
config = {"configurable": {"thread_id": "customer_123"}}
result = app.invoke(initial_state, config)
# The graph will pause at human_review
print(f"Draft ready for review: {result['draft_response'][:100]}...")
print(f"human review interrupt:{result['__interrupt__']}")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update logging to avoid printing draft_response before it exists, which previously caused an error in:
print(f"Draft ready for review: {result['draft_response'][:100]}...")


# When ready, provide human input to resume
from langgraph.types import Command
Expand Down