adding File Content Extraction Services ...

This commit is contained in:
2026-10-01 01:16:24 +03:30
parent aac3eb92c1
commit f32972b55f
6 changed files with 225 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace xAiApi.Interfaces
{
/// <summary>
/// a Service for Extracting File Content ...
/// </summary>
public interface IXFileContentExtractor
{
/// <summary>
/// Check if this extractor supports the specified MIME type ...
/// </summary>
bool CanExtract(string mimeType);
/// <summary>
/// Extract text content from file stream ...
/// </summary>
Task<string> ExtractAsync(
Stream fileStream,
string mimeType,
CancellationToken cancellationToken = default
);
}
}