Class: OpenAI::Models::FineTuning::FineTuningJob::Method

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

Overview

See Also:

  • OpenAI::Models::FineTuning::FineTuningJob#method_

Defined Under Namespace

Modules: Type

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(type:, dpo: nil, reinforcement: nil, supervised: nil) ⇒ Method

Returns a new instance of Method.

Parameters:

  • type —

    The type of method. Is either supervised, dpo, or reinforcement.

  • dpo (defaults to: nil) —

    Configuration for the DPO fine-tuning method.

  • reinforcement (defaults to: nil) —

    Configuration for the reinforcement fine-tuning method.

  • supervised (defaults to: nil) —

    Configuration for the supervised fine-tuning method.

  • type: (OpenAI::Models::FineTuning::FineTuningJob::Method::type_)
  • dpo: (OpenAI::FineTuning::DpoMethod) (defaults to: nil)
  • reinforcement: (OpenAI::FineTuning::ReinforcementMethod) (defaults to: nil)
  • supervised: (OpenAI::FineTuning::SupervisedMethod) (defaults to: nil)


# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 393

Instance Attribute Details

#dpo ⇒ OpenAI::FineTuning::DpoMethod?

Configuration for the DPO fine-tuning method.

Returns:

  • (OpenAI::FineTuning::DpoMethod, nil)


379
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 379

optional :dpo, -> { OpenAI::FineTuning::DpoMethod }

#reinforcement ⇒ OpenAI::FineTuning::ReinforcementMethod?

Configuration for the reinforcement fine-tuning method.

Returns:

  • (OpenAI::FineTuning::ReinforcementMethod, nil)


385
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 385

optional :reinforcement, -> { OpenAI::FineTuning::ReinforcementMethod }

#supervised ⇒ OpenAI::FineTuning::SupervisedMethod?

Configuration for the supervised fine-tuning method.

Returns:

  • (OpenAI::FineTuning::SupervisedMethod, nil)


391
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 391

optional :supervised, -> { OpenAI::FineTuning::SupervisedMethod }

#type ⇒ OpenAI::Models::FineTuning::FineTuningJob::Method::type_

The type of method. Is either supervised, dpo, or reinforcement.

Returns:

  • (OpenAI::Models::FineTuning::FineTuningJob::Method::type_)


373
# File 'lib/openai/models/fine_tuning/fine_tuning_job.rb', line 373

required :type, enum: -> { OpenAI::FineTuning::FineTuningJob::Method::Type }

Instance Method Details

#to_hash ⇒ { type: OpenAI::Models::FineTuning::FineTuningJob::Method::type_, ?dpo: OpenAI::FineTuning::DpoMethod, ?reinforcement: OpenAI::FineTuning::ReinforcementMethod, ?supervised: OpenAI::FineTuning::SupervisedMethod }

Returns:

  • ({ type: OpenAI::Models::FineTuning::FineTuningJob::Method::type_, ?dpo: OpenAI::FineTuning::DpoMethod, ?reinforcement: OpenAI::FineTuning::ReinforcementMethod, ?supervised: OpenAI::FineTuning::SupervisedMethod })


385
386
387
388
389
390
# File 'sig/openai/models/fine_tuning/fine_tuning_job.rbs', line 385

def to_hash: -> {
  type: OpenAI::Models::FineTuning::FineTuningJob::Method::type_,
  ?dpo: OpenAI::FineTuning::DpoMethod,
  ?reinforcement: OpenAI::FineTuning::ReinforcementMethod,
  ?supervised: OpenAI::FineTuning::SupervisedMethod
}