Class: OpenAI::Models::Realtime::ResponseCancelEvent

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

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_id: nil, type: :"response.cancel") ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Realtime::ResponseCancelEvent for more details.

Send this event to cancel an in-progress response. The server will respond with a response.done event with a status of ‘response.status=cancelled`. If there is no response to cancel, the server will respond with an error. It’s safe to call response.cancel even if no response is in progress, an error will be returned the session will remain unaffected.

Parameters:

  • (defaults to: nil)

    Optional client-generated ID used to identify this event.

  • (defaults to: nil)

    A specific response ID to cancel - if not provided, will cancel an

  • (defaults to: :"response.cancel")

    The event type, must be response.cancel.



# File 'lib/openai/models/realtime/response_cancel_event.rb', line 26


Instance Attribute Details

#event_idString?

Optional client-generated ID used to identify this event.

Returns:



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

optional :event_id, String

#response_idString?

A specific response ID to cancel - if not provided, will cancel an in-progress response in the default conversation.

Returns:



24
# File 'lib/openai/models/realtime/response_cancel_event.rb', line 24

optional :response_id, String

#typeSymbol, :"response.cancel"

The event type, must be response.cancel.

Returns:



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

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