Skip to content

Commit 28b9f57

Browse files
authored
fix(docs): synchronize stream and astream docstrings (#6414)
`stream` and `astream` docstrings listed different available `stream_mode` options. Both methods support the same seven stream modes as defined in `StreamMode` Fixed for consistency
1 parent bef76b7 commit 28b9f57

File tree

1 file changed

+3
-0
lines changed
  • libs/langgraph/langgraph/pregel

1 file changed

+3
-0
lines changed

libs/langgraph/langgraph/pregel/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,6 +2431,7 @@ def stream(
24312431
Will be emitted as 2-tuples `(LLM token, metadata)`.
24322432
- `"checkpoints"`: Emit an event when a checkpoint is created, in the same format as returned by `get_state()`.
24332433
- `"tasks"`: Emit events when tasks start and finish, including their results and errors.
2434+
- `"debug"`: Emit debug events with as much information as possible for each step.
24342435
24352436
You can pass a list as the `stream_mode` parameter to stream multiple modes at once.
24362437
The streamed outputs will be tuples of `(mode, data)`.
@@ -2697,6 +2698,8 @@ async def astream(
26972698
- `"custom"`: Emit custom data from inside nodes or tasks using `StreamWriter`.
26982699
- `"messages"`: Emit LLM messages token-by-token together with metadata for any LLM invocations inside nodes or tasks.
26992700
Will be emitted as 2-tuples `(LLM token, metadata)`.
2701+
- `"checkpoints"`: Emit an event when a checkpoint is created, in the same format as returned by `get_state()`.
2702+
- `"tasks"`: Emit events when tasks start and finish, including their results and errors.
27002703
- `"debug"`: Emit debug events with as much information as possible for each step.
27012704
27022705
You can pass a list as the `stream_mode` parameter to stream multiple modes at once.

0 commit comments

Comments
 (0)