assistant-stream
Version:
Streaming utilities for AI assistants
16 lines • 839 B
TypeScript
import type { AssistantStreamChunk } from "../AssistantStreamChunk.js";
import type { AssistantMessage } from "../utils/types.js";
import type { ReadonlyJSONValue } from "../../utils.js";
export declare const createInitialMessage: ({ unstable_state, }?: {
/** @deprecated Experimental since 2025-05-20. Not scheduled for removal; the API may change in any release. */
unstable_state?: ReadonlyJSONValue;
}) => AssistantMessage;
export declare class AssistantMessageAccumulator extends TransformStream<AssistantStreamChunk, AssistantMessage> {
constructor({ initialMessage, throttle, onError, strict, }?: {
initialMessage?: AssistantMessage;
throttle?: boolean;
onError?: (error: string) => void;
strict?: boolean | undefined;
});
}
//# sourceMappingURL=assistant-message-accumulator.d.ts.map