class AssistantStream
implements AsyncIterable<AssistantStreamEvent>
extends AbstractAssistantStreamRunner<AssistantStreamEvents>
import { AssistantStream } from "https://deno.land/x/openai@v4.41.1/lib/AssistantStream.ts";
Methods
protected
_createAssistantStream(run: Runs,
threadId: string,
params: RunCreateParamsBase,
options?: Core.RequestOptions,
protected
_createThreadAssistantStream(thread: Threads,
params: ThreadCreateAndRunParamsBase,
options?: Core.RequestOptions,
protected
_createToolAssistantStream(run: Runs,
threadId: string,
runId: string,
params: RunSubmitToolOutputsParamsStream,
options?: Core.RequestOptions,
protected
_fromReadableStream(readableStream: ReadableStream, options?: Core.RequestOptions): Promise<Run>currentEvent(): AssistantStreamEvent | undefined
currentMessageSnapshot(): Message | undefined
currentRun(): Run | undefined
currentRunStepSnapshot(): Runs.RunStep | undefined
finalMessages(): Promise<Message[]>
finalRun(): Promise<Run>
finalRunSteps(): Promise<Runs.RunStep[]>
[Symbol.asyncIterator](): AsyncIterator<AssistantStreamEvent>
Static Methods
accumulateDelta(acc: Record<string, any>, delta: Record<string, any>): Record<string, any>
createAssistantStream()
threadId: string,
runs: Runs,
params: RunCreateParamsBaseStream,
options?: RequestOptions,
createThreadAssistantStream()
body: ThreadCreateAndRunParamsBaseStream,
thread: Threads,
options?: RequestOptions,
createToolAssistantStream()
threadId: string,
runId: string,
runs: Runs,
body: RunSubmitToolOutputsParamsStream,
options: RequestOptions | undefined,
fromReadableStream(stream: ReadableStream): AssistantStream