Learn R Programming

openaiRtools (version 0.2.2)

UploadsClient: Uploads Client

Description

The Uploads API is designed for files larger than what the Files API can handle in a single request. You split the file into parts, upload each part, then finalize the upload to get a standard file object.

Arguments

Workflow

  1. $create() — Initialize the upload session, get an upload_id

  2. $add_part() — Upload each chunk of the file (called multiple times)

  3. $complete() — Finalize and assemble the file; returns a File object

  4. (Optional) $cancel() — Abort if needed

Methods


Method new()

Usage

UploadsClient$new(parent)


Method create()

Usage

UploadsClient$create(purpose, filename, bytes, mime_type = NULL)


Method add_part()

Usage

UploadsClient$add_part(upload_id, data)


Method complete()

Usage

UploadsClient$complete(upload_id, part_ids, md5 = NULL)


Method cancel()

Usage

UploadsClient$cancel(upload_id)


Method clone()

The objects of this class are cloneable with this method.

Usage

UploadsClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Client for the OpenAI Uploads API. Upload large files in multiple parts (multipart upload) when the file exceeds the 512 MB Files API limit. Access via client$uploads.