Files
SqlDatabaseVectorSearch/SqlDatabaseVectorSearch/ContentDecoders/IContentDecoder.cs
T
Marco Minerva fa81f01c27 Refactor content decoders and restructure data layer
Updated `DocxContentDecoder`, `PdfContentDecoder`, and `TextContentDecoder` to return `Task<IEnumerable<Chunk>>` instead of `Task<string>`, introducing a new `Chunk` record for structured output.

Restructured the `ApplicationDbContext`, `Document`, and `DocumentChunk` classes by moving them to the `SqlDatabaseVectorSearch.Data` namespace for better organization.

Updated database migration files to align with the new entity structure and modified references in `Program.cs`, `DocumentService.cs`, and `VectorSearchService.cs` to use the new namespace.
2025-05-27 17:10:17 +02:00

8 lines
292 B
C#

namespace SqlDatabaseVectorSearch.ContentDecoders;
public interface IContentDecoder
{
Task<IEnumerable<Chunk>> DecodeAsync(Stream stream, string contentType, CancellationToken cancellationToken = default);
}
public record class Chunk(int PageNumber, int IndexOnPage, string Content);