Changes
Build and Push Docker Images / build (push) Successful in 32s

This commit is contained in:
2026-05-06 12:48:44 +03:00
parent 89cb5a10da
commit 91cdb536b1
54 changed files with 153 additions and 137 deletions
@@ -0,0 +1,16 @@
using Api.Models;
namespace Api.Data.Repositories.Contracts;
public interface IRagRepository
{
Task InitializeAsync(CancellationToken ct);
Task<RagDocumentRecord?> GetDocumentByTextHashAsync(string textHash, string? sourceUrl, CancellationToken ct);
Task<RagDocumentRecord?> GetDocumentByIdAsync(string id, CancellationToken ct);
Task SaveDocumentAsync(RagDocumentRecord document, IReadOnlyList<RagChunkRecord> chunks, CancellationToken ct);
Task<IReadOnlyList<SearchCandidateChunk>> SearchChunksAsync(float[] queryEmbedding, IReadOnlyList<string>? targetTypes, int topK, CancellationToken ct);
Task<float[]?> GetEmbeddingAsync(string cacheKey, CancellationToken ct);
Task SaveEmbeddingAsync(string cacheKey, string model, string textHash, float[] vector, CancellationToken ct);
Task<string?> GetChatCompletionAsync(string cacheKey, CancellationToken ct);
Task SaveChatCompletionAsync(string cacheKey, string model, decimal temperature, string responseText, CancellationToken ct);
}