Class: OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/evals/run_create_params.rb,
sig/openai/models/evals/run_create_params.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 responses.

  • 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/run_create_params.rb', line 116

Instance Attribute Details

#input_messagesOpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::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::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::input_messages, nil)


97
98
99
100
# File 'lib/openai/models/evals/run_create_params.rb', line 97

optional(
  :input_messages,
  union: -> { OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages }
)

#modelString?

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

Returns:

  • (String, nil)


106
# File 'lib/openai/models/evals/run_create_params.rb', line 106

optional :model, String

#sampling_paramsOpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams?



111
112
113
114
# File 'lib/openai/models/evals/run_create_params.rb', line 111

optional(
  :sampling_params,
  -> { OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::SamplingParams }
)

#sourceOpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::source

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

Returns:

  • (OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::source)


76
77
78
79
# File 'lib/openai/models/evals/run_create_params.rb', line 76

required(
  :source,
  union: -> { OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source }
)

#typeOpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::type_

The type of run data source. Always responses.

Returns:

  • (OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::type_)


85
86
87
88
# File 'lib/openai/models/evals/run_create_params.rb', line 85

required(
  :type,
  enum: -> { OpenAI::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Type }
)

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/evals/run_create_params.rb', line 362

.variantsArray(OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::Template, OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::InputMessages::ItemReference)



# File 'lib/openai/models/evals/run_create_params.rb', line 350

Instance Method Details

#to_hash{

Returns:

  • ({)


132
# File 'sig/openai/models/evals/run_create_params.rbs', line 132

def to_hash: -> {