feat(sdk): add context API support for useStream (#1462)

This commit is contained in:
David Duong
2025-07-29 18:24:15 +02:00
committed by GitHub
parent 6752e1f609
commit 8e1ec9e59a
2 changed files with 9 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@langchain/langgraph-sdk": patch
---
feat(sdk): add Context API support for useStream
+4 -2
View File
@@ -725,9 +725,10 @@ type ConfigWithConfigurable<ConfigurableType extends Record<string, unknown>> =
interface SubmitOptions<
StateType extends Record<string, unknown> = Record<string, unknown>,
ConfigurableType extends Record<string, unknown> = Record<string, unknown>
ContextType extends Record<string, unknown> = Record<string, unknown>
> {
config?: ConfigWithConfigurable<ConfigurableType>;
config?: ConfigWithConfigurable<ContextType>;
context?: ContextType;
checkpoint?: Omit<Checkpoint, "thread_id"> | null;
command?: Command;
interruptBefore?: "*" | string[];
@@ -1222,6 +1223,7 @@ export function useStream<
const stream = client.runs.stream(usableThreadId, assistantId, {
input: values as Record<string, unknown>,
config: submitOptions?.config,
context: submitOptions?.context,
command: submitOptions?.command,
interruptBefore: submitOptions?.interruptBefore,