class

OpenAI::CreateUploadRequest

Inherits JSON::Serializable < Reference < Object

Constructors

new(filename : String = "", purpose : CreateUploadRequestPurpose = CreateUploadRequestPurpose::Assistants, bytes : Int64 = 0, mime_type : String = "", expires_after : FileExpirationAfter | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

bytes

The number of bytes in the file you are uploading.

Source
bytes=(bytes : Int64)

The number of bytes in the file you are uploading.

Source
expires_after
Source
expires_after=(expires_after : FileExpirationAfter | Nil)
Source
filename

The name of the file to upload.

Source
filename=(filename : String)

The name of the file to upload.

Source
mime_type

The MIME type of the file.

This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.

Source
mime_type=(mime_type : String)

The MIME type of the file.

This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.

Source
purpose

The intended purpose of the uploaded file.

See the documentation on File purposes.

Source
purpose=(purpose : CreateUploadRequestPurpose)

The intended purpose of the uploaded file.

See the documentation on File purposes.

Source