mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-08 18:57:52 +02:00
fix: Allow users to config whether or not stream subgraphs
This commit is contained in:
@@ -613,6 +613,12 @@ interface SubmitOptions<
|
||||
optimisticValues?:
|
||||
| Partial<StateType>
|
||||
| ((prev: StateType) => Partial<StateType>);
|
||||
/**
|
||||
* Whether or not to stream the nodes of any subgraphs called
|
||||
* by the assistant.
|
||||
* @default false
|
||||
*/
|
||||
streamSubgraphs?: boolean;
|
||||
}
|
||||
|
||||
export function useStream<
|
||||
@@ -868,6 +874,7 @@ export function useStream<
|
||||
|
||||
checkpoint,
|
||||
streamMode,
|
||||
streamSubgraphs: submitOptions?.streamSubgraphs ?? false,
|
||||
}) as AsyncGenerator<EventStreamEvent>;
|
||||
|
||||
let streamError: StreamError | undefined;
|
||||
|
||||
Reference in New Issue
Block a user