Skip to content
Merged
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
7 changes: 5 additions & 2 deletions ai_datastream/agent/langgraph/streamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ def __init__(self, agent: CompiledGraph, thread_id: Union[str, None] = None):
self.status = StreamStatus.INIT

def _handle_stream_finish(self) -> Generator[DataStreamPart, None, None]:
snapshot = self.agent.get_state(self.config)
if snapshot.next:
try:
snapshot = self.agent.get_state(self.config)
except ValueError:
snapshot = None
if snapshot and snapshot.next:
self.status = StreamStatus.INTERRUPTED
return
if self.converter.current_message_id is not None:
Expand Down