files_upload_request {oaii}R Documentation

API files: upload request

Description

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 (https://platform.openai.com/docs/assistants/tools) to learn more about the types of files supported. The Fine-tuning API only supports .jsonl files. To get more details, visit: https://platform.openai.com/docs/api-reference/files/upload

Usage

files_upload_request(file, purpose, file_type = NULL, api_key = api_get_key())

Arguments

file

string/raw, path or content of the JSON Lines file to be uploaded

purpose

string, the intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning.

file_type

NULL/string, mime type of 'file'. See api_upload_file

api_key

string, OpenAI API key (see https://platform.openai.com/account/api-keys)

Value

content of the httr response object or SimpleError (conditions) enhanced with two additional fields: 'status_code' (response$status_code) and 'message_long' (built on response content)


[Package oaii version 0.5.0 Index]