Class: OpenAI::Models::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/evals/create_eval_completions_run_data_source.rb,
sig/openai/models/evals/create_eval_completions_run_data_source.rbs

Defined Under Namespace

Classes: Content

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 ⇒ FileContent

Returns a new instance of FileContent.

Parameters:

  • content —

    The content of the jsonl file.

  • type —

    The type of jsonl source. Always file_content.

  • content: (::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content])
  • type: (:file_content)


98
99
100
101
# File 'sig/openai/models/evals/create_eval_completions_run_data_source.rbs', line 98

def initialize: (
  content: ::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content],
  ?type: :file_content
) -> void

Instance Attribute Details

#content ⇒ ::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content]

The content of the jsonl file.

Returns:

  • (::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content])


82
83
84
85
86
87
88
89
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 82

required(
  :content,
  -> {
    OpenAI::Internal::Type::ArrayOf[
      OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content
    ]
  }
)

#type ⇒ :file_content

The type of jsonl source. Always file_content.

Returns:

  • (:file_content)


95
# File 'lib/openai/models/evals/create_eval_completions_run_data_source.rb', line 95

required :type, const: :file_content

Instance Method Details

#to_hash ⇒ { content: ::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content], ?type: :file_content }

Returns:

  • ({ content: ::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content], ?type: :file_content })


103
104
105
106
# File 'sig/openai/models/evals/create_eval_completions_run_data_source.rbs', line 103

def to_hash: -> {
  content: ::Array[OpenAI::Evals::CreateEvalCompletionsRunDataSource::Source::FileContent::Content],
  ?type: :file_content
}