using System.Collections; using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; using xAiModels.Models; namespace xAiApi.Interfaces.Extractors { /// /// a Base Service for Extracting File Content ... /// public interface IXFileContentExtractorBase { /// /// Check if this extractor supports the specified MIME type ... /// bool CanExtract(string mimeType); /// /// Extract text content from file stream ... /// Task ExtractAsync( Stream fileStream, string mimeType, CancellationToken cancellationToken = default ); /// /// Extract content from stream as Rich Result ... /// /// /// /// /// /// Task ExtractRichAsync( Stream fileStream, string fileName, string mimeType, CancellationToken cancellationToken = default ); } /// /// a Service for Extracting File Content ... /// public interface IXFileContentExtractor { /// /// Check if this extractor supports the specified MIME type ... /// /// /// /// bool CanExtract( string mimeType, string[] extractors = null ); /// /// Extract text content from file stream ... /// /// /// /// /// /// Task ExtractAsync( Stream fileStream, string mimeType, string[] extractors = null, CancellationToken cancellationToken = default ); /// /// Extract content from stream as Rich Result ... /// /// /// /// /// /// /// Task ExtractRichAsync( Stream fileStream, string fileName, string mimeType, string[] extractors = null, CancellationToken cancellationToken = default ); } }