Class: OpenAI::Models::BatchError

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/batch_error.rb,
sig/openai/models/batch_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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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: nil, line: nil, message: nil, param: nil) ⇒ BatchError

Returns a new instance of BatchError.

Parameters:

  • code (defaults to: nil) —

    An error code identifying the error type.

  • line (defaults to: nil) —

    The line number of the input file where the error occurred, if applicable.

  • message (defaults to: nil) —

    A human-readable message providing more details about the error.

  • param (defaults to: nil) —

    The name of the parameter that caused the error, if applicable.

  • code: (String) (defaults to: nil)
  • line: (Integer, nil) (defaults to: nil)
  • message: (String) (defaults to: nil)
  • param: (String, nil) (defaults to: nil)


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

Instance Attribute Details

#code ⇒ String?

An error code identifying the error type.

Returns:

  • (String, nil)


10
# File 'lib/openai/models/batch_error.rb', line 10

optional :code, String

#line ⇒ Integer?

The line number of the input file where the error occurred, if applicable.

Returns:

  • (Integer, nil)


16
# File 'lib/openai/models/batch_error.rb', line 16

optional :line, Integer, nil?: true

#message ⇒ String?

A human-readable message providing more details about the error.

Returns:

  • (String, nil)


22
# File 'lib/openai/models/batch_error.rb', line 22

optional :message, String

#param ⇒ String?

The name of the parameter that caused the error, if applicable.

Returns:

  • (String, nil)


28
# File 'lib/openai/models/batch_error.rb', line 28

optional :param, String, nil?: true

Instance Method Details

#to_hash ⇒ { ?code: String, ?line: Integer?, ?message: String, ?param: String? }

Returns:

  • ({ ?code: String, ?line: Integer?, ?message: String, ?param: String? })


40
41
42
43
44
45
# File 'sig/openai/models/batch_error.rbs', line 40

def to_hash: -> {
  ?code: String,
  ?line: Integer?,
  ?message: String,
  ?param: String?
}