feat(sdk-js): add stream_resumable flag, that marks the stream as resumable

This commit is contained in:
Tat Dat Duong
2025-05-20 14:13:47 +02:00
parent 1e938a692f
commit b052ebf984
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -894,6 +894,7 @@ export class RunsClient<
metadata: payload?.metadata,
stream_mode: payload?.streamMode,
stream_subgraphs: payload?.streamSubgraphs,
stream_resumable: payload?.streamResumable,
feedback_keys: payload?.feedbackKeys,
assistant_id: assistantId,
interrupt_before: payload?.interruptBefore,
@@ -953,6 +954,7 @@ export class RunsClient<
metadata: payload?.metadata,
stream_mode: payload?.streamMode,
stream_subgraphs: payload?.streamSubgraphs,
stream_resumable: payload?.streamResumable,
assistant_id: assistantId,
interrupt_before: payload?.interruptBefore,
interrupt_after: payload?.interruptAfter,
+12
View File
@@ -156,6 +156,12 @@ export interface RunsStreamPayload<
*/
streamSubgraphs?: TSubgraphs;
/**
* Whether the stream is considered resumable.
* If true, the stream can be resumed and replayed in its entirety even after disconnection.
*/
streamResumable?: boolean;
/**
* Pass one or more feedbackKeys if you want to request short-lived signed URLs
* for submitting feedback to LangSmith with this key for this run.
@@ -173,6 +179,12 @@ export interface RunsCreatePayload extends RunsInvokePayload {
* Stream output from subgraphs. By default, streams only the top graph.
*/
streamSubgraphs?: boolean;
/**
* Whether the stream is considered resumable.
* If true, the stream can be resumed and replayed in its entirety even after disconnection.
*/
streamResumable?: boolean;
}
export interface CronsCreatePayload extends RunsCreatePayload {