ai-utils.js
Version:
Build AI applications, chatbots, and agents with JavaScript and TypeScript.
20 lines (19 loc) • 631 B
TypeScript
import { DeltaEvent } from "../../../model-function/generate-text/DeltaEvent.js";
export type OpenAIChatDelta = Array<{
role: "assistant" | "user" | undefined;
content: string;
function_call?: {
name: string;
arguments: string;
};
isComplete: boolean;
delta: {
role?: "assistant" | "user";
content?: string | null;
function_call?: {
name?: string;
arguments?: string;
};
};
}>;
export declare function createOpenAIChatFullDeltaIterableQueue(stream: ReadableStream<Uint8Array>): Promise<AsyncIterable<DeltaEvent<OpenAIChatDelta>>>;