Function: toStreamingResponse()
function toStreamingResponse(stream: AsyncGenerator<SessionState, any, unknown>, keepAliveDelay: number): Response
Generate a streaming response from a generator returned by client.runStream
.
Parameters
Parameter | Type | Description |
---|---|---|
|
| An async generator returned by |
|
| The delay in milliseconds to send keep-alive messages. Default is 1 minute. |
Returns
Response
A streaming Response object