Skip to content
Open
Changes from all commits
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
2 changes: 1 addition & 1 deletion pydantic-ai-langgraph-parallelization/agent_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def gather_info(state: TravelState, writer) -> Dict[str, Any]:
curr_response = ""
async for message, last in result.stream_structured(debounce_by=0.01):
try:
if last and not travel_details.response:
if last and not (travel_details or travel_details.response):
raise Exception("Incorrect travel details returned by the agent.")
travel_details = await result.validate_structured_result(
message,
Expand Down