Class: OpenAI::Models::FileObject
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::FileObject
- Defined in:
- lib/openai/models/file_object.rb,
sig/openai/models/file_object.rbs
Overview
Defined Under Namespace
Instance Attribute Summary collapse
-
#bytes ⇒ Integer
The size of the file, in bytes.
-
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the file was created.
-
#expires_at ⇒ Integer?
The Unix timestamp (in seconds) for when the file will expire.
-
#filename ⇒ String
The name of the file.
-
#id ⇒ String
The file identifier, which can be referenced in the API endpoints.
-
#object ⇒ :file
The object type, which is always
file. -
#purpose ⇒ OpenAI::Models::FileObject::purpose
The intended purpose of the file.
-
#status ⇒ OpenAI::Models::FileObject::status
Deprecated.
-
#status_details ⇒ String?
Deprecated.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(id:, bytes:, created_at:, filename:, purpose:, status:, expires_at: nil, status_details: nil, object: :file) ⇒ Object constructor
- #to_hash ⇒ {
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(id:, bytes:, created_at:, filename:, purpose:, status:, expires_at: nil, status_details: nil, object: :file) ⇒ Object
|
|
# File 'lib/openai/models/file_object.rb', line 69
|
Instance Attribute Details
#bytes ⇒ Integer
The size of the file, in bytes.
17 |
# File 'lib/openai/models/file_object.rb', line 17 required :bytes, Integer |
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the file was created.
23 |
# File 'lib/openai/models/file_object.rb', line 23 required :created_at, Integer |
#expires_at ⇒ Integer?
The Unix timestamp (in seconds) for when the file will expire.
58 |
# File 'lib/openai/models/file_object.rb', line 58 optional :expires_at, Integer |
#filename ⇒ String
The name of the file.
29 |
# File 'lib/openai/models/file_object.rb', line 29 required :filename, String |
#id ⇒ String
The file identifier, which can be referenced in the API endpoints.
11 |
# File 'lib/openai/models/file_object.rb', line 11 required :id, String |
#object ⇒ :file
The object type, which is always file.
35 |
# File 'lib/openai/models/file_object.rb', line 35 required :object, const: :file |
#purpose ⇒ OpenAI::Models::FileObject::purpose
The intended purpose of the file. Supported values are assistants,
assistants_output, batch, batch_output, fine-tune, fine-tune-results,
vision, and user_data.
43 |
# File 'lib/openai/models/file_object.rb', line 43 required :purpose, enum: -> { OpenAI::FileObject::Purpose } |
#status ⇒ OpenAI::Models::FileObject::status
Deprecated. The current status of the file, which can be either uploaded,
processed, or error.
52 |
# File 'lib/openai/models/file_object.rb', line 52 required :status, enum: -> { OpenAI::FileObject::Status } |
#status_details ⇒ String?
Deprecated. For details on why a fine-tuning training file failed validation,
see the error field on fine_tuning.job.
67 |
# File 'lib/openai/models/file_object.rb', line 67 optional :status_details, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/file_object.rb', line 120
|
Instance Method Details
#to_hash ⇒ {
89 |
# File 'sig/openai/models/file_object.rbs', line 89
def to_hash: -> {
|