using Rag.Models; namespace Api.Data.Repositories.Contracts; public interface IRagRepository { Task InitializeAsync(CancellationToken ct); Task GetDocumentByTextHashAsync(string textHash, string? sourceUrl, CancellationToken ct); Task GetDocumentByIdAsync(string id, CancellationToken ct); Task SaveDocumentAsync(RagDocumentRecord document, IReadOnlyList chunks, CancellationToken ct); Task> SearchChunksAsync(float[] queryEmbedding, IReadOnlyList? targetTypes, int topK, CancellationToken ct); Task GetEmbeddingAsync(string cacheKey, CancellationToken ct); Task SaveEmbeddingAsync(string cacheKey, string model, string textHash, float[] vector, CancellationToken ct); Task GetChatCompletionAsync(string cacheKey, CancellationToken ct); Task SaveChatCompletionAsync(string cacheKey, string model, decimal temperature, string responseText, CancellationToken ct); }