Class IFileServiceExtension
- Namespace
- OpenAI.Interfaces
- Assembly
- AntRunnerLib.dll
public static class IFileServiceExtension
- Inheritance
-
System.ObjectIFileServiceExtension
- Inherited Members
-
System.Object.Equals(System.Object)System.Object.Equals(System.Object, System.Object)System.Object.GetHashCode()System.Object.GetType()System.Object.MemberwiseClone()System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ToString()
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
serviceIFileServicepurposeUploadFilePurposes.UploadFilePurposefileStreamfileNameSystem.StringcancellationTokenCancellationToken
Returns
- Task<FileUploadResponse>
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
serviceIFileServicepurposeUploadFilePurposes.UploadFilePurposefileSystem.Byte[]fileNameSystem.StringcancellationTokenCancellationToken
Returns
- Task<FileUploadResponse>
FileUpload(IFileService, String, Stream, String, CancellationToken)
public static Task<FileUploadResponse> FileUpload(this IFileService service, string purpose, Stream file, string fileName, CancellationToken cancellationToken = null)
Parameters
serviceIFileServicepurposeSystem.StringfileStreamfileNameSystem.StringcancellationTokenCancellationToken
Returns
- Task<FileUploadResponse>
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
serviceIFileServicefileIdSystem.StringThe ID of the file to use for this request
cancellationTokenCancellationTokenPropagates notification that operations should be canceled.
Returns
- Task<FileContentResponse<System.String>>