Class: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource

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

Defined Under Namespace

Modules: InputMessages, Source, Type Classes: SamplingParams

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(item_reference:, type: :item_reference) ⇒ Object

Parameters:

  • source —

    Determines what populates the item namespace in this run's data source.

  • type (defaults to: :item_reference) —

    The type of run data source. Always completions.

  • input_messages —

    Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, item.input_trajectory), or a template with variable references to the item namespace.

  • model —

    The name of the model to use for generating completions (e.g. "o3-mini").



# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 39

Instance Attribute Details

#input_messages ⇒ OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::input_messages?

Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, item.input_trajectory), or a template with variable references to the item namespace.

Returns:

  • (OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::input_messages, nil)


26
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 26

optional :input_messages, union: -> { OpenAI::Evals::CreateEvalCompletionsRunDataSource::InputMessages }

#model ⇒ String?

The name of the model to use for generating completions (e.g. "o3-mini").

Returns:

  • (String, nil)


32
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 32

optional :model, String

#sampling_params ⇒ OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::SamplingParams?



37
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 37

optional :sampling_params, -> { OpenAI::Evals::CreateEvalCompletionsRunDataSource::SamplingParams }

#source ⇒ OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::source

Determines what populates the item namespace in this run's data source.

Returns:

  • (OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::source)


11
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 11

required :source, union: -> { OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source }

#type ⇒ OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::type_

The type of run data source. Always completions.

Returns:

  • (OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::type_)


17
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 17

required :type, enum: -> { OpenAI::Evals::CreateEvalCompletionsRunDataSource::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 222

.variants ⇒ Array(OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::ItemReference)



# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 210

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


65
# File 'sig/openai/models/evals/create_eval_completions_run_data_source.rbs', line 65

def to_hash: -> {