Function: toSSE()
@providerprotocol/ai / proxy/server / toSSE
Function: toSSE()
Section titled “Function: toSSE()”toSSE(
stream):Response
Defined in: src/providers/proxy/server/webapi.ts:254
Create an SSE Response from a StreamResult.
Streams PP StreamEvents as SSE, then sends the final Turn data.
Parameters
Section titled “Parameters”stream
Section titled “stream”The StreamResult from instance.stream()
Returns
Section titled “Returns”Response
HTTP Response with SSE body
Example
Section titled “Example”const stream = instance.stream(messages);return toSSE(stream);