48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
namespace ChatRAG.Models
|
|
{
|
|
public class ResponseOptions
|
|
{
|
|
public int MaxContextDocuments { get; set; } = 3;
|
|
public double SimilarityThreshold { get; set; } = 0.3;
|
|
public bool IncludeSourceDetails { get; set; } = false;
|
|
public bool IncludeTiming { get; set; } = true;
|
|
public Dictionary<string, object>? Filters { get; set; }
|
|
}
|
|
|
|
public class ResponseResult
|
|
{
|
|
public string Content { get; set; } = string.Empty;
|
|
public List<SourceDocument> Sources { get; set; } = new();
|
|
public ResponseMetrics Metrics { get; set; } = new();
|
|
public string Provider { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class SourceDocument
|
|
{
|
|
public string Id { get; set; } = string.Empty;
|
|
public string Title { get; set; } = string.Empty;
|
|
public string Content { get; set; } = string.Empty;
|
|
public double Similarity { get; set; }
|
|
public Dictionary<string, object>? Metadata { get; set; }
|
|
}
|
|
|
|
public class ResponseMetrics
|
|
{
|
|
public long TotalTimeMs { get; set; }
|
|
public long SearchTimeMs { get; set; }
|
|
public long LlmTimeMs { get; set; }
|
|
public int DocumentsFound { get; set; }
|
|
public int DocumentsUsed { get; set; }
|
|
public double AverageSimilarity { get; set; }
|
|
}
|
|
|
|
public class ResponseStats
|
|
{
|
|
public int TotalRequests { get; set; }
|
|
public double AverageResponseTime { get; set; }
|
|
public Dictionary<string, int> RequestsByProject { get; set; } = new();
|
|
public DateTime LastRequest { get; set; }
|
|
public string Provider { get; set; } = string.Empty;
|
|
}
|
|
}
|