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
files_upload_request(file, purpose, file_type = NULL, api_key = api_get_key())
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)
string/raw, path or content of the JSON Lines file to be uploaded
string, the intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning.
NULL/string, mime type of `file`. See api_upload_file
string, OpenAI API key (see https://platform.openai.com/account/api-keys)