Class FilesClient
java.lang.Object
io.github.stefanbratanov.jvm.openai.FilesClient
Files are used to upload documents that can be used with features like Assistants and
Fine-tuning.
Based on Files
-
Method Summary
Modifier and TypeMethodDescriptiondeleteFile
(String fileId) Delete a fileReturns a list of files that belong to the user's organizationretrieveFile
(String fileId) Returns information about a specific filebyte[]
retrieveFileContent
(String fileId) Returns the contents of the specified fileuploadFile
(UploadFileRequest request) Upload a file that can be used across various endpoints.
-
Method Details
-
uploadFile
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.- Throws:
OpenAIException
- in case of API errors
-
listFiles
Returns a list of files that belong to the user's organization- Throws:
OpenAIException
- in case of API errors
-
retrieveFile
Returns information about a specific file- Throws:
OpenAIException
- in case of API errors
-
deleteFile
Delete a file- Throws:
OpenAIException
- in case of API errors
-
retrieveFileContent
Returns the contents of the specified file- Throws:
OpenAIException
- in case of API errors
-