Class: OpenAI::Models::Evals::RunCreateParams::DataSource::CreateEvalResponsesRunDataSource::Source::FileContent::Content

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/evals/run_create_params.rb,
sig/openai/models/evals/run_create_params.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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(content:, type: :file_content) ⇒ Content

Returns a new instance of Content.

Parameters:



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/openai/models/evals/run_create_params.rb', line 186

class Content < OpenAI::Internal::Type::BaseModel
  # @!attribute item
  #
  #   @return [Hash{Symbol=>Object}]
  required :item, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

  # @!attribute sample
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :sample, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

  # @!method initialize(item:, sample: nil)
  #   @param item [Hash{Symbol=>Object}]
  #   @param sample [Hash{Symbol=>Object}]
end

Instance Attribute Details

#item ⇒ Hash{Symbol=>Object}

Parameters:

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

Returns:

  • (Hash{Symbol=>Object})


190
# File 'lib/openai/models/evals/run_create_params.rb', line 190

required :item, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

#sample ⇒ Hash{Symbol=>Object}?

Parameters:

  • (::Hash[Symbol, top])

Returns:

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


195
# File 'lib/openai/models/evals/run_create_params.rb', line 195

optional :sample, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

Instance Method Details

#to_hash ⇒ { item: ::Hash[Symbol, top], ?sample: ::Hash[Symbol, top] }

Returns:

  • ({ item: ::Hash[Symbol, top], ?sample: ::Hash[Symbol, top] })


250
251
252
253
# File 'sig/openai/models/evals/run_create_params.rbs', line 250

def to_hash: -> {
  item: ::Hash[Symbol, top],
  ?sample: ::Hash[Symbol, top]
}