Class: OpenAI::Responses::Transports::AsyncWebSocket Private
- Inherits:
-
WebSocket::AsyncWebSocketTransport
- Object
- WebSocket::AsyncWebSocketTransport
- OpenAI::Responses::Transports::AsyncWebSocket
- Defined in:
- lib/openai/helpers/responses_websocket/transports/async_websocket.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Responses facade for the shared optional async WebSocket transport.
Instance Method Summary collapse
-
#initialize ⇒ AsyncWebSocket
constructor
private
A new instance of AsyncWebSocket.
Methods inherited from WebSocket::AsyncWebSocketTransport
Constructor Details
#initialize ⇒ AsyncWebSocket
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AsyncWebSocket.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/openai/helpers/responses_websocket/transports/async_websocket.rb', line 10 def initialize error_factory = lambda do |url:, message: nil, http_status: nil, **| OpenAI::Errors::ResponsesConnectionError.new( url: url, message: , http_status: http_status ) end super( product_name: "Responses", error_class: OpenAI::Errors::ResponsesConnectionError, error_factory: error_factory, dependency_message: "Responses WebSockets require the async-websocket gem. Add it to your Gemfile." ) end |