files | R Documentation |
Files Class
Files Class
openaistream::openai
-> files
upload()
Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB.The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See the Assistants Tools guide to learn more about the types of files supported. The Fine-tuning API only supports .jsonl files.
files$upload(path = NULL, verbosity = 0, purpose = "fine-tune")
path
character Required. Path to the file that needs to be uploaded.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
purpose
The intended purpose of the uploaded file. Use "fine-tune" for Fine-tuning and "assistants" for Assistants and Messages. This allows us to validate the format of the uploaded file is correct for fine-tuning.
The uploaded File object.
list()
Returns a list of files that belong to the user's organization.
files$list(..., verbosity = 0)
...
Additional parameters as required by the OpenAI API.For example:purpose
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
A list of File objects.
delete()
Delete a file.
files$delete(file_id, verbosity = 0)
file_id
character Required. The ID of the file to use for this request.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Deletion status.
retrieve()
Returns information about a specific file.
files$retrieve(file_id, verbosity = 0)
file_id
character Required. The ID of the file to retrieve details for.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
The File object matching the specified ID.
retrieve_content()
Returns information about a specific file content.
files$retrieve_content(file_id, verbosity = 0)
file_id
character Required. The ID of the file to retrieve details for.
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
The File object matching the specified ID.
clone()
The objects of this class are cloneable with this method.
files$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.