Class: OpenAI::Models::EvalRetrieveResponse

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

Overview

See Also:

  • OpenAI::Resources::Evals#retrieve

Defined Under Namespace

Modules: DataSourceConfig, TestingCriterion

Constant Summary collapse

OpenAI =

Returns:

  • (:EvalCustomDataSourceConfig)

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

Parameters:

  • id —

    Unique identifier for the evaluation.

  • created_at —

    The Unix timestamp (in seconds) for when the eval was created.

  • data_source_config —

    Configuration of data sources used in runs of the evaluation.

  • 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.

  • testing_criteria —

    A list of testing criteria.

  • object —

    The object type.



# File 'lib/openai/models/eval_retrieve_response.rb', line 57

Instance Attribute Details

#created_at ⇒ Integer

The Unix timestamp (in seconds) for when the eval was created.

Returns:

  • (Integer)


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

required :created_at, Integer

#data_source_config ⇒ OpenAI::Models::EvalRetrieveResponse::data_source_config

Configuration of data sources used in runs of the evaluation.

Returns:

  • (OpenAI::Models::EvalRetrieveResponse::data_source_config)


23
# File 'lib/openai/models/eval_retrieve_response.rb', line 23

required :data_source_config, union: -> { OpenAI::Models::EvalRetrieveResponse::DataSourceConfig }

#id ⇒ String

Unique identifier for the evaluation.

Returns:

  • (String)


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

required :id, String

#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)


34
# File 'lib/openai/models/eval_retrieve_response.rb', line 34

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

#name ⇒ String

The name of the evaluation.

Returns:

  • (String)


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

required :name, String

#object ⇒ :eval

The object type.

Returns:

  • (:eval)


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

required :object, const: :eval

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

A list of testing criteria.

Returns:

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


52
53
54
55
# File 'lib/openai/models/eval_retrieve_response.rb', line 52

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

Class Method Details

.variants ⇒ Array(OpenAI::Models::EvalCustomDataSourceConfig, OpenAI::Models::EvalRetrieveResponse::DataSourceConfig::Logs, OpenAI::Models::EvalStoredCompletionsDataSourceConfig)



# File 'lib/openai/models/eval_retrieve_response.rb', line 162

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


70
# File 'sig/openai/models/eval_retrieve_response.rbs', line 70

def to_hash: -> {