Class: OpenAI::Models::Evals::Runs::OutputItemRetrieveResponse::Sample::Input

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(error:, finish_reason:, input:, max_completion_tokens:, model:, output:, seed:, temperature:, top_p:, usage:) ⇒ Input

Returns a new instance of Input.

Parameters:

  • content —

    The content of the message.

  • role —

    The role of the message sender (e.g., system, user, developer).

  • content: (String)
  • role: (String)


258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/openai/models/evals/runs/output_item_retrieve_response.rb', line 258

class Input < OpenAI::Internal::Type::BaseModel
  # @!attribute content
  #   The content of the message.
  #
  #   @return [String]
  required :content, String

  # @!attribute role
  #   The role of the message sender (e.g., system, user, developer).
  #
  #   @return [String]
  required :role, String

  # @!method initialize(content:, role:)
  #   An input message.
  #
  #   @param content [String]
  #     The content of the message.
  #
  #   @param role [String]
  #     The role of the message sender (e.g., system, user, developer).
end

Instance Attribute Details

#content ⇒ String

The content of the message.

Returns:

  • (String)


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

required :content, String

#role ⇒ String

The role of the message sender (e.g., system, user, developer).

Returns:

  • (String)


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

required :role, String

Instance Method Details

#to_hash ⇒ { content: String, role: String }

Returns:

  • ({ content: String, role: String })


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

def to_hash: -> { content: String, role: String }