class

OpenAI::Upload

Inherits JSON::Serializable < Reference < Object

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

Constructors

new(id : String = "", created_at : Int64 = 0, filename : String = "", bytes : Int64 = 0, purpose : String = "", status : UploadStatus = UploadStatus::Pending, expires_at : Int64 = 0, object : UploadObject = UploadObject::Upload, file : UploadFile | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

bytes

The intended number of bytes to be uploaded.

Source
bytes=(bytes : Int64)

The intended number of bytes to be uploaded.

Source
created_at

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

Source
created_at=(created_at : Int64)

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

Source
expires_at

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

Source
expires_at=(expires_at : Int64)

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

Source
file
Source
file=(file : UploadFile | Nil)
Source
filename

The name of the file to be uploaded.

Source
filename=(filename : String)

The name of the file to be uploaded.

Source
id

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

Source
id=(id : String)

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

Source
object

The object type, which is always "upload".

Source
object=(object : UploadObject)

The object type, which is always "upload".

Source
purpose

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

Source
purpose=(purpose : String)

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

Source
status

The status of the Upload.

Source
status=(status : UploadStatus)

The status of the Upload.

Source