Class: OpenAI::Models::Chat::ChatCompletionContentPart::File::File

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

Overview

See Also:

  • OpenAI::Models::Chat::ChatCompletionContentPart::File#file

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

Returns a new instance of File.

Parameters:

  • file_data —

    The base64 encoded file data, used when passing the file to the model as a string.

  • file_id —

    The ID of an uploaded file to use as input.

  • filename —

    The name of the file, used when passing the file to the model as a string.

  • file_data: (String)
  • file_id: (String)
  • filename: (String)


89
90
91
92
93
# File 'sig/openai/models/chat/chat_completion_content_part.rbs', line 89

def initialize: (
  ?file_data: String,
  ?file_id: String,
  ?filename: String
) -> void

Instance Attribute Details

#file_data ⇒ String?

The base64 encoded file data, used when passing the file to the model as a string.

Returns:

  • (String, nil)


68
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 68

optional :file_data, String

#file_id ⇒ String?

The ID of an uploaded file to use as input.

Returns:

  • (String, nil)


74
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 74

optional :file_id, String

#filename ⇒ String?

The name of the file, used when passing the file to the model as a string.

Returns:

  • (String, nil)


80
# File 'lib/openai/models/chat/chat_completion_content_part.rb', line 80

optional :filename, String

Instance Method Details

#to_hash ⇒ { ?file_data: String, ?file_id: String, ?filename: String }

Returns:

  • ({ ?file_data: String, ?file_id: String, ?filename: String })


95
96
97
98
99
# File 'sig/openai/models/chat/chat_completion_content_part.rbs', line 95

def to_hash: -> {
  ?file_data: String,
  ?file_id: String,
  ?filename: String
}