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

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

Defined Under Namespace

Modules: InputMessages, Source, Type Classes: SamplingParams

Instance Attribute Summary collapse

Class Method 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, 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:

  • item_reference (String) (defaults to: )

    A reference to a variable in the ‘item` namespace. Ie, “item.input_trajectory”

  • type (Symbol, :item_reference) (defaults to: :item_reference)

    The type of input messages. Always ‘item_reference`.



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

Instance Attribute Details

#input_messagesOpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::InputMessages::Template, ...

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.



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

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

#modelString?

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

Returns:

  • (String, nil)


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

optional :model, String

#sampling_paramsOpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::SamplingParams?



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

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

#sourceOpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent, ...

Determines what populates the ‘item` namespace in this run’s data source.



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

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

#typeSymbol, OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Type

The type of run data source. Always ‘completions`.



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

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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