Class: OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Result

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

Instance Attribute 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, 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(id:, created_at:, datasource_item:, datasource_item_id:, eval_id:, results:, run_id:, sample:, status:, object: :"eval.run.output_item") ⇒ Object

A schema representing an evaluation run output item.

Parameters:

  • id (String)

    Unique identifier for the evaluation run output item.

  • created_at (Integer)

    Unix timestamp (in seconds) when the evaluation run was created.

  • datasource_item (Hash{Symbol=>Object})

    Details of the input data source item.

  • datasource_item_id (Integer)

    The identifier for the data source item.

  • eval_id (String)

    The identifier of the evaluation group.

  • results (Array<OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Result>)

    A list of grader results for this output item.

  • run_id (String)

    The identifier of the evaluation run associated with this output item.

  • sample (OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample)

    A sample containing the input and output of the evaluation run.

  • status (String)

    The status of the evaluation run.

  • object (Symbol, :"eval.run.output_item") (defaults to: :"eval.run.output_item")

    The type of the object. Always “eval.run.output_item”.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 93

class Result < OpenAI::Internal::Type::BaseModel
  # @!attribute name
  #   The name of the grader.
  #
  #   @return [String]
  required :name, String

  # @!attribute passed
  #   Whether the grader considered the output a pass.
  #
  #   @return [Boolean]
  required :passed, OpenAI::Internal::Type::Boolean

  # @!attribute score
  #   The numeric score produced by the grader.
  #
  #   @return [Float]
  required :score, Float

  # @!attribute sample
  #   Optional sample or intermediate data produced by the grader.
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :sample, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true

  # @!attribute type
  #   The grader type (for example, "string-check-grader").
  #
  #   @return [String, nil]
  optional :type, String

  # @!method initialize(name:, passed:, score:, sample: nil, type: nil)
  #   A single grader result for an evaluation run output item.
  #
  #   @param name [String] The name of the grader.
  #
  #   @param passed [Boolean] Whether the grader considered the output a pass.
  #
  #   @param score [Float] The numeric score produced by the grader.
  #
  #   @param sample [Hash{Symbol=>Object}, nil] Optional sample or intermediate data produced by the grader.
  #
  #   @param type [String] The grader type (for example, "string-check-grader").
end

Instance Attribute Details

#nameString

The name of the grader.

Returns:

  • (String)


98
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 98

required :name, String

#passedBoolean

Whether the grader considered the output a pass.

Returns:



104
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 104

required :passed, OpenAI::Internal::Type::Boolean

#sampleHash{Symbol=>Object}?

Optional sample or intermediate data produced by the grader.

Returns:

  • (Hash{Symbol=>Object}, nil)


116
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 116

optional :sample, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true

#scoreFloat

The numeric score produced by the grader.

Returns:

  • (Float)


110
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 110

required :score, Float

#typeString?

The grader type (for example, “string-check-grader”).

Returns:

  • (String, nil)


122
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 122

optional :type, String