Class IFileServiceExtension
- Namespace
- OpenAI.
Interfaces
- Assembly
- AntRunnerLib.dll
- Inheritance
-
System.
Object IFileService Extension
- Inherited Members
-
System.
Object. Equals(System. Object) System.Object. Equals(System. Object, System. Object) System.Object. Get Hash Code() System.Object. Get Type() System.Object. Memberwise Clone() System.Object. Reference Equals(System. Object, System. Object) System.Object. To String()
Methods
FileUpload(IFileService, UploadFilePurposes.UploadFilePurpose, Stream, String, CancellationToken)
public static Task<FileUploadResponse> FileUpload(this IFileService service, UploadFilePurposes.UploadFilePurpose purpose, Stream file, string fileName, CancellationToken cancellationToken = null)
Parameters
service
IFileService purpose
UploadFile Purposes. Upload File Purpose file
StreamfileName
System.String cancellationToken
CancellationToken
Returns
- Task<File
Upload >Response
FileUpload(IFileService, UploadFilePurposes.UploadFilePurpose, Byte[], String, CancellationToken)
public static Task<FileUploadResponse> FileUpload(this IFileService service, UploadFilePurposes.UploadFilePurpose purpose, byte[] file, string fileName, CancellationToken cancellationToken = null)
Parameters
service
IFileService purpose
UploadFile Purposes. Upload File Purpose file
System.Byte []fileName
System.String cancellationToken
CancellationToken
Returns
- Task<File
Upload >Response
FileUpload(IFileService, String, Stream, String, CancellationToken)
public static Task<FileUploadResponse> FileUpload(this IFileService service, string purpose, Stream file, string fileName, CancellationToken cancellationToken = null)
Parameters
service
IFileService purpose
System.String file
StreamfileName
System.String cancellationToken
CancellationToken
Returns
- Task<File
Upload >Response
RetrieveFileContent(IFileService, String, CancellationToken)
Returns the contents of the specified file
public static Task<FileContentResponse<string>> RetrieveFileContent(this IFileService service, string fileId, CancellationToken cancellationToken = null)
Parameters
service
IFileService 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 <System.Response String >>