mirror of
https://github.com/langchain-ai/langgraphjs.git
synced 2026-07-25 13:15:45 -04:00
feat(sdk): add context API support for useStream (#1462)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph-sdk": patch
|
||||
---
|
||||
|
||||
feat(sdk): add Context API support for useStream
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user