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.
Methods
Section titled “Methods”feed()
Section titled “feed()”feed(
chunk):string
Translate one upstream chat.completion.chunk object.
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”string
finish()
Section titled “finish()”finish():
string
Close any open items and emit response.completed. Call once, at end of stream.
Returns
Section titled “Returns”string