Class: OpenAI::Models::Realtime::ResponseCreateEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Realtime::ResponseCreateEvent
- Defined in:
- lib/openai/models/realtime/response_create_event.rb,
sig/openai/models/realtime/response_create_event.rbs
Instance Attribute Summary collapse
-
#event_id ⇒ String?
Optional client-generated ID used to identify this event.
-
#response ⇒ OpenAI::Models::Realtime::RealtimeResponseCreateParams?
Create a new Realtime response with these parameters.
-
#type ⇒ Symbol, :"response.create"
The event type, must be
response.create.
Instance Method Summary collapse
-
#initialize(event_id: nil, response: nil, type: :"response.create") ⇒ Object
constructor
This event instructs the server to create a Response, which means triggering model inference.
- #to_hash ⇒ {
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 by default.
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 tools. If these are set, they will override the Session's configuration
for this Response only.
Responses can be created out-of-band of the default Conversation, meaning that
they can have arbitrary input, and it's possible to disable writing the output
to the Conversation. Only one Response can write to the default Conversation at
a time, but otherwise multiple Responses can be created in parallel. The
metadata field is a good way to disambiguate multiple simultaneous Responses.
Clients can set conversation to none to create a Response that does not
write to the default Conversation. Arbitrary input can be provided with the
input field, which is an array accepting raw Items and references to existing
Items.
|
|
# File 'lib/openai/models/realtime/response_create_event.rb', line 25
|
Instance Attribute Details
#event_id ⇒ String?
Optional client-generated ID used to identify this event.
17 |
# File 'lib/openai/models/realtime/response_create_event.rb', line 17 optional :event_id, String |
#response ⇒ OpenAI::Models::Realtime::RealtimeResponseCreateParams?
Create a new Realtime response with these parameters
23 |
# File 'lib/openai/models/realtime/response_create_event.rb', line 23 optional :response, -> { OpenAI::Realtime::RealtimeResponseCreateParams } |
#type ⇒ Symbol, :"response.create"
The event type, must be response.create.
11 |
# File 'lib/openai/models/realtime/response_create_event.rb', line 11 required :type, const: :"response.create" |
Instance Method Details
#to_hash ⇒ {
30 |
# File 'sig/openai/models/realtime/response_create_event.rbs', line 30
def to_hash: -> {
|