langgraph 0.2.10
Summary of Changes
- Improved streaming output handling in the Pregel execution model to ensure more consistent processing
- Enhanced debug output to include error and interrupt information
- Fixed a bug where streamed output might be lost when a task completes execution
Detailed Changes
langgraph.pregel.Pregel
- Refactored streaming mechanism for better output handling in
streamandastreammethods - Moved stream handling to ensure outputs are properly emitted even after loop context exit
- Changed how tasks and their results are processed in the streaming pipeline
langgraph.pregel.debug.TaskResultPayload
- Added new fields to enhance debug information:
error: Optional[str]: Captures any error that occurred during task executioninterrupts: list[dict]: Records any interrupts that were triggered
langgraph.pregel.debug.map_debug_task_results
- Updated function signature to accept task-writes pairs instead of just tasks
- Improved handling of stream keys to support both string and sequence formats
- Enhanced output to include error information and interrupts
langgraph.pregel.loop.PregelLoop
- Added
stream_keysas a class attribute to better manage streaming outputs - Enhanced
put_writesmethod to automatically stream updates and debug information - Simplified
tickmethod by removing redundant parameters
langgraph.pregel.loop.SyncPregelLoop and AsyncPregelLoop
- Updated constructor signatures to support the new streaming architecture
- Aligned with changes in the base PregelLoop class
langgraph.pregel.io.map_output_updates
- Modified to handle the new task-writes tuple format
- Added filtering to exclude ERROR and INTERRUPT keys from regular output streams