Class: OpenAI::Models::Upload
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Upload
- Defined in:
- lib/openai/models/upload.rb
Overview
Defined Under Namespace
Modules: Status
Instance Attribute Summary collapse
-
#bytes ⇒ Integer
The intended number of bytes to be uploaded.
-
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the Upload was created.
-
#expires_at ⇒ Integer
The Unix timestamp (in seconds) for when the Upload will expire.
-
#file ⇒ OpenAI::Models::FileObject?
The ‘File` object represents a document that has been uploaded to OpenAI.
-
#filename ⇒ String
The name of the file to be uploaded.
-
#id ⇒ String
The Upload unique identifier, which can be referenced in API endpoints.
-
#object ⇒ Symbol, :upload
The object type, which is always “upload”.
-
#purpose ⇒ String
The intended purpose of the file.
-
#status ⇒ Symbol, OpenAI::Models::Upload::Status
The status of the Upload.
Instance Method Summary collapse
-
#initialize(id: , bytes: , created_at: , expires_at: , filename: , purpose: , status: , file: nil, object: :upload) ⇒ Object
constructor
Some parameter documentations has been truncated, see Upload for more details.
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, 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) ⇒ Object
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
#bytes ⇒ Integer
The intended number of bytes to be uploaded.
17 |
# File 'lib/openai/models/upload.rb', line 17 required :bytes, Integer |
#created_at ⇒ Integer
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_at ⇒ Integer
The Unix timestamp (in seconds) for when the Upload will expire.
29 |
# File 'lib/openai/models/upload.rb', line 29 required :expires_at, Integer |
#file ⇒ OpenAI::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 |
#filename ⇒ String
The name of the file to be uploaded.
35 |
# File 'lib/openai/models/upload.rb', line 35 required :filename, String |
#id ⇒ String
The Upload unique identifier, which can be referenced in API endpoints.
11 |
# File 'lib/openai/models/upload.rb', line 11 required :id, String |
#object ⇒ Symbol, :upload
The object type, which is always “upload”.
41 |
# File 'lib/openai/models/upload.rb', line 41 required :object, const: :upload |
#purpose ⇒ String
The intended purpose of the file. [Please refer here](platform.openai.com/docs/api-reference/files/object#files/object-purpose) for acceptable values.
49 |
# File 'lib/openai/models/upload.rb', line 49 required :purpose, String |
#status ⇒ Symbol, OpenAI::Models::Upload::Status
The status of the Upload.
55 |
# File 'lib/openai/models/upload.rb', line 55 required :status, enum: -> { OpenAI::Upload::Status } |