This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Rag.Models;
|
||||
|
||||
namespace Api.Services.Contracts;
|
||||
|
||||
public interface IDocumentClassifier
|
||||
{
|
||||
Task<DocumentClassification> ClassifyAsync(string text, string? providedType, string? providedTitle, CancellationToken ct);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Rag.Models.Requests;
|
||||
using Rag.Models.Responses;
|
||||
|
||||
namespace Api.Services.Contracts;
|
||||
|
||||
public interface IRagService
|
||||
{
|
||||
Task<IndexDocumentResponse> IndexTextAsync(IndexDocumentRequest request, CancellationToken ct);
|
||||
Task<IndexDocumentResponse> IndexPdfAsync(IFormFile file, string? documentType, string? title, string? sourceUrl, CancellationToken ct);
|
||||
Task<SearchResponse> SearchAsync(SearchRequest request, CancellationToken ct);
|
||||
Task<RagDocumentDetailsResponse?> GetDocumentAsync(string documentId, CancellationToken ct);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Api.Services.Contracts;
|
||||
|
||||
public interface ITextChunker
|
||||
{
|
||||
IReadOnlyList<string> Chunk(string text, int chunkSize, int overlap);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Api.Services.Contracts;
|
||||
|
||||
public interface ITextExtractor
|
||||
{
|
||||
Task<string> ExtractPdfAsync(Stream stream, CancellationToken ct);
|
||||
string Normalize(string value);
|
||||
}
|
||||
Reference in New Issue
Block a user