Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 100 GB.
Supports files up to 2 million tokens and of specific file types.
var file =newFormFile("path/to/mydata.jsonl");var request =newFileUploadRequest.Builder() .SetFile(file) .SetPurpose(UploadPurpose.FineTune) .Build();var result =awaitOpenAI.DefaultInstance.Files.Upload(request);Debug.Log(result.Id);
from openai import OpenAIclient =OpenAI()client.files.create( file=open("mydata.jsonl", "rb"), purpose="fine-tune")
Please contact OpenAI if you need to increase these storage limits.
Returns a list of files that belong to the user's organization.
var fileList =awaitOpenAI.DefaultInstance.Files.List();foreach (var fileData in fileList){Debug.Log(fileData.Id);Debug.Log(fileData.CreatedAt);Debug.Log(fileData.Purpose);}
from openai import OpenAIclient =OpenAI()client.files.list()