Interface IFileService
- Namespace
- OpenAI.
Interfaces
- Assembly
- AntRunnerLib.dll
- Extension Methods
Methods
DeleteFile(String, CancellationToken)
Delete a file.
Parameters
fileId
System.String The ID of the file to use for this request
cancellationToken
CancellationToken Propagates notification that operations should be canceled.
Returns
- Task<File
Delete >Response
ListFile(CancellationToken)
Returns a list of files that belong to the user's organization.
Parameters
cancellationToken
CancellationToken Propagates notification that operations should be canceled.
Returns
- Task<File
List >Response
RetrieveFile(String, CancellationToken)
Returns information about a specific file.
Parameters
fileId
System.String The ID of the file to use for this request
cancellationToken
CancellationToken Propagates notification that operations should be canceled.
Returns
- Task<File
Response >
RetrieveFileContent<T>(String, CancellationToken)
Returns the contents of the specified file
Task<FileContentResponse<T>> RetrieveFileContent<T>(string fileId, CancellationToken cancellationToken = null)
Parameters
fileId
System.String The ID of the file to use for this request
cancellationToken
CancellationToken Propagates notification that operations should be canceled.
Returns
- Task<File
Content <T>>Response
Type Parameters
T
UploadFile(String, Byte[], String, CancellationToken)
Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
Task<FileUploadResponse> UploadFile(string purpose, byte[] file, string fileName, CancellationToken cancellationToken = null)
Parameters
purpose
System.String The intended purpose of the uploaded documents. Use "fine-tune" for Fine-tuning. This allows us to validate the format of the uploaded file.
file
System.Byte []Name of the JSON Lines file to be uploaded. If the purpose is set to "fine-tune", each line is a JSON record with "prompt" and "completion" fields representing your training examples.
fileName
System.String Name of file
cancellationToken
CancellationToken Propagates notification that operations should be canceled.
Returns
- Task<File
Upload >Response