@@ -0,0 +1,10 @@
|
||||
namespace Api.Data.Entities;
|
||||
|
||||
public sealed class RagChatCompletionCacheEntity
|
||||
{
|
||||
public string CacheKey { get; set; } = string.Empty;
|
||||
public string Model { get; set; } = string.Empty;
|
||||
public decimal Temperature { get; set; }
|
||||
public string ResponseText { get; set; } = string.Empty;
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Api.Data.Entities;
|
||||
|
||||
public sealed class RagChunkEntity
|
||||
{
|
||||
public string Id { get; set; } = string.Empty;
|
||||
public string DocumentId { get; set; } = string.Empty;
|
||||
public int ChunkIndex { get; set; }
|
||||
public string Text { get; set; } = string.Empty;
|
||||
public byte[] Embedding { get; set; } = [];
|
||||
|
||||
public RagDocumentEntity? Document { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Api.Data.Entities;
|
||||
|
||||
public sealed class RagDocumentEntity
|
||||
{
|
||||
public string Id { get; set; } = string.Empty;
|
||||
public string DocumentType { get; set; } = string.Empty;
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string? SourceUrl { get; set; }
|
||||
public string RawText { get; set; } = string.Empty;
|
||||
public string TextHash { get; set; } = string.Empty;
|
||||
public double TypeConfidence { get; set; }
|
||||
public string MetadataJson { get; set; } = "{}";
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public ICollection<RagChunkEntity> Chunks { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Api.Data.Entities;
|
||||
|
||||
public sealed class RagEmbeddingCacheEntity
|
||||
{
|
||||
public string CacheKey { get; set; } = string.Empty;
|
||||
public string Model { get; set; } = string.Empty;
|
||||
public string TextHash { get; set; } = string.Empty;
|
||||
public byte[] Vector { get; set; } = [];
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
Reference in New Issue
Block a user