mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-10 03:37:51 +02:00
Add notebook for configuring multiple streaming modes. Update stream events notebook to show token-by-token streaming. (#792)
This commit is contained in:
@@ -36,13 +36,13 @@ The LangGraph Cloud API offers several features to support complex agent archite
|
||||
### Streaming
|
||||
Streaming is critical for making LLM applications feel responsive to end users. When creating a streaming run, the streaming mode determines what data is streamed back to the API client. The LangGraph Cloud API supports five streaming modes.
|
||||
|
||||
- **values**: Stream the full state of the graph after each node is executed. See the [How-to Guide](../../how-tos/cloud_examples/stream_values/) for streaming values.
|
||||
- **messages**: Stream complete messages (at the end of node execution) as well as tokens for any messages generated inside a node. This mode is primarily meant for powering chat applications. This is only an option if your graph contains a `messages` key. See the [How-to Guide](../../how-tos/cloud_examples/stream_messages/) for streaming messages.
|
||||
- **updates**: Streams updates to the state of the graph after each node is executed. See the [How-to Guide](../../how-tos/cloud_examples/stream_updates/) for streaming updates.
|
||||
- **events**: Stream all events (including the state of the graph) after each node is executed. See the [How-to Guide](../../how-tos/cloud_examples/stream_events/) for streaming events. This can be used to do token-by-token streaming for LLMs.
|
||||
- **debug**: Stream debug events after each node is executed. See the [How-to Guide](../../how-tos/cloud_examples/stream_debug/) for streaming debug events.
|
||||
- `values`: Stream the full state of the graph after each node is executed. See the [How-to Guide](../how-tos/cloud_examples/stream_values/) for streaming values.
|
||||
- `messages`: Stream complete messages (at the end of node execution) as well as tokens for any messages generated inside a node. This mode is primarily meant for powering chat applications. This is only an option if your graph contains a `messages` key. See the [How-to Guide](../how-tos/cloud_examples/stream_messages/) for streaming messages.
|
||||
- `updates`: Streams updates to the state of the graph after each node is executed. See the [How-to Guide](../how-tos/cloud_examples/stream_updates/) for streaming updates.
|
||||
- `events`: Stream all events (including the state of the graph) after each node is executed. See the [How-to Guide](../how-tos/cloud_examples/stream_events/) for streaming events. This can be used to do token-by-token streaming for LLMs.
|
||||
- `debug`: Stream debug events after each node is executed. See the [How-to Guide](../how-tos/cloud_examples/stream_debug/) for streaming debug events.
|
||||
|
||||
You can also specify multiple streaming modes at the same time.
|
||||
You can also specify multiple streaming modes at the same time. See the [How-to Guide](../how-tos/cloud_examples/stream_multiple/) for configuring multiple streaming modes at the same time.
|
||||
|
||||
See the [API Reference](../reference/api_ref.md) for how to create streaming runs.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user