Package: @effect/ai-openai
Module: OpenAiClient
Service for creating OpenAI response streams over a WebSocket connection.
When to use
Use when you need direct access to the WebSocket-backed response streaming service rather than wrapping an effect with WebSocket mode.
Details
createResponseStream sends a response.create message over the WebSocket
connection and returns an HTTP response together with a stream of
ResponseStreamEvent values.
Gotchas
WebSocket response streams are serialized to one request at a time by the shared socket service.
See
withWebSocketMode for enabling WebSocket mode for one effectlayerWebSocketMode for providing WebSocket mode through a layerSignature
declare class OpenAiSocket
Since v4.0.0