Skip to main content

Module openai_responses_websocket

Module openai_responses_websocket 

Source
Expand description

Transport-level helpers for the OpenAI Responses WebSocket surface.

The WebSocket request frame is a response.create object. Internally GPROXY runs the existing HTTP Responses pipeline, so the frame is converted into a normal /v1/responses JSON body. The response path strips SSE framing back to plain JSON text messages, matching the Responses WebSocket wire shape.

Structs§

ResponseWebSocketSseDecoder
Incrementally converts Responses SSE bytes into WebSocket text messages.

Functions§

http_request_to_ws_request
Convert a normal HTTP Responses request body into a WebSocket response.create text frame.
identity
response_create_frame_to_response_body
Convert a downstream response.create WebSocket text frame into the JSON body for an internal POST /v1/responses request.
validate_response_create_frame
Validate a downstream Responses WebSocket frame without normalizing it.
ws_request_to_http_request
Convert a WebSocket response.create frame back into a normal HTTP Responses request body.