class

OpenAI::OpenAIFile

Inherits JSON::Serializable < Reference < Object

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

Constructors

new(id : String = "", bytes : Int64 = 0, created_at : Int64 = 0, expires_at : Int64 | Nil = nil, filename : String = "", object : OpenAIFileObject = OpenAIFileObject::File, purpose : OpenAIFilePurpose = OpenAIFilePurpose::Assistants, status : OpenAIFileStatus = OpenAIFileStatus::Uploaded, status_details : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

bytes

The size of the file, in bytes.

Source
bytes=(bytes : Int64)

The size of the file, in bytes.

Source
created_at

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

Source
created_at=(created_at : Int64)

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

Source
expires_at

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

Source
expires_at=(expires_at : Int64 | Nil)

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

Source
filename

The name of the file.

Source
filename=(filename : String)

The name of the file.

Source
id

The file identifier, which can be referenced in the API endpoints.

Source
id=(id : String)

The file identifier, which can be referenced in the API endpoints.

Source
object

The object type, which is always file.

Source
object=(object : OpenAIFileObject)

The object type, which is always file.

Source
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.

Source
purpose=(purpose : OpenAIFilePurpose)

The intended purpose of the file. Supported values are assistants, assistants_output, batch, batch_output, fine-tune, fine-tune-results, vision, and user_data.

Source
status

Deprecated. The current status of the file, which can be either uploaded, processed, or error.

Source
status=(status : OpenAIFileStatus)

Deprecated. The current status of the file, which can be either uploaded, processed, or error.

Source
status_details

Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.

Source
status_details=(status_details : String | Nil)

Deprecated. For details on why a fine-tuning training file failed validation, see the error field on fine_tuning.job.

Source