Class: OpenAI::Models::EvalCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/eval_create_params.rb,
sig/openai/models/eval_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Evals#create

Defined Under Namespace

Modules: DataSourceConfig, TestingCriterion

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(metadata: nil, type: :stored_completions) ⇒ Object

Parameters:

  • data_source_config —

    The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.

  • testing_criteria —

    A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like {{item.variable_name}}. To reference the model's output, use the sample namespace (ie, {{sample.output_text}}).

  • metadata (defaults to: nil) —

    Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

    Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

  • name —

    The name of the evaluation.



# File 'lib/openai/models/eval_create_params.rb', line 46

Instance Attribute Details

#data_source_config ⇒ OpenAI::Models::EvalCreateParams::data_source_config

The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.

Returns:

  • (OpenAI::Models::EvalCreateParams::data_source_config)


15
# File 'lib/openai/models/eval_create_params.rb', line 15

required :data_source_config, union: -> { OpenAI::EvalCreateParams::DataSourceConfig }

#metadata ⇒ OpenAI::Models::metadata?

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

  • (OpenAI::Models::metadata, nil)


38
# File 'lib/openai/models/eval_create_params.rb', line 38

optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#name ⇒ String?

The name of the evaluation.

Returns:

  • (String, nil)


44
# File 'lib/openai/models/eval_create_params.rb', line 44

optional :name, String

#testing_criteria ⇒ ::Array[OpenAI::Models::EvalCreateParams::testing_criterion]

A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like {{item.variable_name}}. To reference the model's output, use the sample namespace (ie, {{sample.output_text}}).

Returns:

  • (::Array[OpenAI::Models::EvalCreateParams::testing_criterion])


24
25
26
27
# File 'lib/openai/models/eval_create_params.rb', line 24

required(
  :testing_criteria,
  -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::EvalCreateParams::TestingCriterion] }
)

Class Method Details

.variants ⇒ Array(OpenAI::Models::EvalCreateParams::DataSourceConfig::Custom, OpenAI::Models::EvalCreateParams::DataSourceConfig::Logs, OpenAI::Models::EvalCreateParams::DataSourceConfig::StoredCompletions)



# File 'lib/openai/models/eval_create_params.rb', line 177

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {