Class: OpenAI::Models::EvalCustomDataSourceConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/eval_custom_data_source_config.rb,
sig/openai/models/eval_custom_data_source_config.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(schema:, type: :custom) ⇒ EvalCustomDataSourceConfig

Returns a new instance of EvalCustomDataSourceConfig.

Parameters:

  • schema —

    The json schema for the run data source items. Learn how to build JSON schemas here.

  • type (defaults to: :custom) —

    The type of data source. Always custom.

  • schema: (::Hash[Symbol, top])
  • type: (:custom) (defaults to: :custom)


# File 'lib/openai/models/eval_custom_data_source_config.rb', line 19

Instance Attribute Details

#schema ⇒ ::Hash[Symbol, top]

The json schema for the run data source items. Learn how to build JSON schemas here.

Returns:

  • (::Hash[Symbol, top])


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

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

#type ⇒ :custom

The type of data source. Always custom.

Returns:

  • (:custom)


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

required :type, const: :custom

Instance Method Details

#to_hash ⇒ { schema: ::Hash[Symbol, top], ?type: :custom }

Returns:

  • ({ schema: ::Hash[Symbol, top], ?type: :custom })


21
# File 'sig/openai/models/eval_custom_data_source_config.rbs', line 21

def to_hash: -> { schema: ::Hash[Symbol, top], ?type: :custom }