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,
sig/openai/models/evals/runs/output_item_retrieve_response.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

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

Parameters:

  • name —

    The name of the grader.

  • passed —

    Whether the grader considered the output a pass.

  • score —

    The numeric score produced by the grader.

  • sample —

    Optional sample or intermediate data produced by the grader.

  • type —

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



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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 104

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

#name ⇒ String

The name of the grader.

Returns:

  • (String)


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

required :name, String

#passed ⇒ Boolean

Whether the grader considered the output a pass.

Returns:



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

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

#sample ⇒ ::Hash[Symbol, top]?

Optional sample or intermediate data produced by the grader.

Returns:

  • (::Hash[Symbol, top], nil)


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

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

#score ⇒ Float

The numeric score produced by the grader.

Returns:

  • (Float)


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

required :score, Float

#type ⇒ String?

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

Returns:

  • (String, nil)


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

optional :type, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


142
# File 'sig/openai/models/evals/runs/output_item_retrieve_response.rbs', line 142

def to_hash: -> {