last ...
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -6,9 +8,9 @@ using xAiModels.Models;
|
||||
namespace xAiApi.Interfaces.Extractors
|
||||
{
|
||||
/// <summary>
|
||||
/// a Service for Extracting File Content ...
|
||||
/// a Base Service for Extracting File Content ...
|
||||
/// </summary>
|
||||
public interface IXFileContentExtractor
|
||||
public interface IXFileContentExtractorBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Check if this extractor supports the specified MIME type ...
|
||||
@@ -39,4 +41,54 @@ namespace xAiApi.Interfaces.Extractors
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a Service for Extracting File Content ...
|
||||
/// </summary>
|
||||
public interface IXFileContentExtractor
|
||||
{
|
||||
/// <summary>
|
||||
/// Check if this extractor supports the specified MIME type ...
|
||||
/// </summary>
|
||||
/// <param name="mimeType"></param>
|
||||
/// <param name="extractors"></param>
|
||||
/// <returns></returns>
|
||||
bool CanExtract(
|
||||
string mimeType,
|
||||
string[] extractors = null
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Extract text content from file stream ...
|
||||
/// </summary>
|
||||
/// <param name="fileStream"></param>
|
||||
/// <param name="mimeType"></param>
|
||||
/// <param name="extractors"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> ExtractAsync(
|
||||
Stream fileStream,
|
||||
string mimeType,
|
||||
string[] extractors = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Extract content from stream as Rich Result ...
|
||||
/// </summary>
|
||||
/// <param name="fileStream"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="mimeType"></param>
|
||||
/// <param name="extractors"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<XFileExtractionResult> ExtractRichAsync(
|
||||
Stream fileStream,
|
||||
string fileName,
|
||||
string mimeType,
|
||||
string[] extractors = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user