Class: OpenAI::Responses::ConnectionResources::Response
- Inherits:
-
Object
- Object
- OpenAI::Responses::ConnectionResources::Response
- Defined in:
- lib/openai/helpers/responses_websocket/connection_resources.rb
Instance Method Summary collapse
-
#create(**params) ⇒ nil
Send a response.create event over this connection.
-
#initialize(connection) ⇒ Response
constructor
private
A new instance of Response.
Constructor Details
#initialize(connection) ⇒ Response
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 Response.
8 9 10 |
# File 'lib/openai/helpers/responses_websocket/connection_resources.rb', line 8 def initialize(connection) @connection = connection end |
Instance Method Details
#create(**params) ⇒ nil
Send a response.create event over this connection.
15 16 17 18 |
# File 'lib/openai/helpers/responses_websocket/connection_resources.rb', line 15 def create(**params) event_params = params.reject { |key, _value| key == :type || key == "type" } @connection.send_response_create(**event_params, type: :"response.create") end |