import { RecordedTimings, SSEChunk, StreamingProfile } from "./types.js"; import * as http$1 from "node:http"; //#region src/sse-writer.d.ts declare function delay(ms: number, signal?: AbortSignal): Promise; interface StreamOptions { latency?: number; streamingProfile?: StreamingProfile; recordedTimings?: RecordedTimings; replaySpeed?: number; signal?: AbortSignal; onChunkSent?: () => void; /** When set, emitted as the final chunk before [DONE] (OpenAI stream_options.include_usage). */ usageChunk?: SSEChunk; } declare function calculateDelay(chunkIndex: number, profile?: StreamingProfile, fallbackLatency?: number, recordedTimings?: RecordedTimings, replaySpeed?: number): number; declare function writeSSEStream(res: http$1.ServerResponse, chunks: SSEChunk[], optionsOrLatency?: number | StreamOptions): Promise; interface ErrorResponseOptions { /** Override the Retry-After header value (seconds). Default: 1. Only applied on 429. */ retryAfter?: number; } declare function writeErrorResponse(res: http$1.ServerResponse, status: number, body: string, options?: ErrorResponseOptions): void; //# sourceMappingURL=sse-writer.d.ts.map //#endregion export { ErrorResponseOptions, StreamOptions, calculateDelay, delay, writeErrorResponse, writeSSEStream }; //# sourceMappingURL=sse-writer.d.ts.map