Class: OpenAI::Models::Live::Error

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/error.rb,
sig/openai/models/live/error.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(code:, message:, type:, client_event_id: nil, param: nil) ⇒ Object

Details of an error encountered by the Live session, including the affected parameter or client command when available.

Parameters:

  • code (String)

    A machine-readable code identifying the Live error, such as unknown_parameter.

  • message (String)

    A human-readable explanation of the Live error.

  • type (String)

    The category of error, such as invalid_request_error for an invalid Live client command.

  • client_event_id (String) (defaults to: nil)

    The event_id of the client command that caused the error, when supplied.

  • param (String) (defaults to: nil)

    The parameter that caused the error, when applicable, such as session.voice.



# File 'lib/openai/models/live/error.rb', line 38

Instance Attribute Details

#client_event_idString?

The event_id of the client command that caused the error, when supplied.

Parameters:

  • (String)

Returns:

  • (String, nil)


30
# File 'lib/openai/models/live/error.rb', line 30

optional :client_event_id, String

#codeString

A machine-readable code identifying the Live error, such as unknown_parameter.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/openai/models/live/error.rb', line 11

required :code, String

#messageString

A human-readable explanation of the Live error.

Parameters:

  • value (String)

Returns:

  • (String)


17
# File 'lib/openai/models/live/error.rb', line 17

required :message, String

#paramString?

The parameter that caused the error, when applicable, such as session.voice.

Parameters:

  • (String)

Returns:

  • (String, nil)


36
# File 'lib/openai/models/live/error.rb', line 36

optional :param, String

#typeString

The category of error, such as invalid_request_error for an invalid Live client command.

Parameters:

  • value (String)

Returns:

  • (String)


24
# File 'lib/openai/models/live/error.rb', line 24

required :type, String

Instance Method Details

#to_hash{

Returns:

  • ({)


36
# File 'sig/openai/models/live/error.rbs', line 36

def to_hash: -> {