Class: OpenAI::Models::Realtime::ResponseCreateEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/response_create_event.rb

Defined Under Namespace

Classes: Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(event_id: nil, response: nil, type: :"response.create") ⇒ Object

This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically.

A Response will include at least one Item, and may have two, in which case the second will be a function call. These Items will be appended to the conversation history.

The server will respond with a ‘response.created` event, events for Items and content created, and finally a `response.done` event to indicate the Response is complete.

The ‘response.create` event includes inference configuration like `instructions`, and `temperature`. These fields will override the Session’s configuration for this Response only.

Parameters:

  • event_id (String) (defaults to: nil)

    Optional client-generated ID used to identify this event.

  • response (OpenAI::Models::Realtime::ResponseCreateEvent::Response) (defaults to: nil)

    Create a new Realtime response with these parameters

  • type (Symbol, :"response.create") (defaults to: :"response.create")

    The event type, must be ‘response.create`.



# File 'lib/openai/models/realtime/response_create_event.rb', line 25

Instance Attribute Details

#event_idString?

Optional client-generated ID used to identify this event.

Returns:

  • (String, nil)


17
# File 'lib/openai/models/realtime/response_create_event.rb', line 17

optional :event_id, String

#responseOpenAI::Models::Realtime::ResponseCreateEvent::Response?

Create a new Realtime response with these parameters



23
# File 'lib/openai/models/realtime/response_create_event.rb', line 23

optional :response, -> { OpenAI::Realtime::ResponseCreateEvent::Response }

#typeSymbol, :"response.create"

The event type, must be ‘response.create`.

Returns:



11
# File 'lib/openai/models/realtime/response_create_event.rb', line 11

required :type, const: :"response.create"