Skip to content

Interface: ResponsesStreamTranslator

Incremental chat-chunk -> Responses-SSE translator. feed and finish both return the SSE bytes to forward, or "" when a chunk produced no event.

feed(chunk): string

Translate one upstream chat.completion.chunk object.

Record<string, unknown>

string


finish(): string

Close any open items and emit response.completed. Call once, at end of stream.

string