Class: OpenAI::Models::Upload

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/upload.rb

Overview

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, inspect, #inspect, 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(id: , bytes: , created_at: , expires_at: , filename: , purpose: , status: , file: nil, object: :upload) ⇒ void

Some parameter documentations has been truncated, see OpenAI::Models::Upload for more details.

The Upload object can accept byte chunks in the form of Parts.



# File 'lib/openai/models/upload.rb', line 63


Instance Attribute Details

#bytesInteger

The intended number of bytes to be uploaded.



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

required :bytes, Integer

#created_atInteger

The Unix timestamp (in seconds) for when the Upload was created.



23
# File 'lib/openai/models/upload.rb', line 23

required :created_at, Integer

#expires_atInteger

The Unix timestamp (in seconds) for when the Upload will expire.



29
# File 'lib/openai/models/upload.rb', line 29

required :expires_at, Integer

#fileOpenAI::Models::FileObject?

The File object represents a document that has been uploaded to OpenAI.



61
# File 'lib/openai/models/upload.rb', line 61

optional :file, -> { OpenAI::FileObject }, nil?: true

#filenameString

The name of the file to be uploaded.



35
# File 'lib/openai/models/upload.rb', line 35

required :filename, String

#idString

The Upload unique identifier, which can be referenced in API endpoints.



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

required :id, String

#objectSymbol, :upload

The object type, which is always "upload".



41
# File 'lib/openai/models/upload.rb', line 41

required :object, const: :upload

#purposeString

The intended purpose of the file. Please refer here for acceptable values.



49
# File 'lib/openai/models/upload.rb', line 49

required :purpose, String

#statusSymbol, OpenAI::Models::Upload::Status

The status of the Upload.



55
# File 'lib/openai/models/upload.rb', line 55

required :status, enum: -> { OpenAI::Upload::Status }