/** * Streaming Support for LLM SDK * * Provides Server-Sent Events (SSE) parsing and streaming chat completions. */ import { LLMResponsePayload, StreamDelta, StreamingOptions, Message } from '../types'; /** * Parse a Server-Sent Events line */ export declare function parseSSELine(line: string): { event?: string; data?: string; } | null; /** * Parse SSE data into a StreamDelta */ export declare function parseStreamDelta(data: string): StreamDelta | null; /** * Accumulate stream deltas into a complete message */ export declare class StreamAccumulator { private role; private content; private functionName; private functionArgs; private finishReason; /** * Add a delta to the accumulator */ addDelta(delta: StreamDelta): void; /** * Get the accumulated message */ getMessage(): Message; /** * Get finish reason */ getFinishReason(): string; /** * Get current content */ getContent(): string; } /** * Async generator that yields stream deltas from a ReadableStream */ export declare function streamFromResponse(response: Response): AsyncGenerator; /** * Process a stream with callbacks */ export declare function processStream(stream: AsyncIterable, options: StreamingOptions): Promise; //# sourceMappingURL=index.d.ts.map