- 从文件模块的多部分上传处理器中移除未使用的实体引用 - 从即时通讯模块的群组成员处理器中移除未使用的实体引用 - 从RAG模块的AI模型配置中移除未使用的实体引用 - 从监控模块的告警规则配置中移除未使用的实体引用 - 从平台模块的角色权限处理器中移除未使用的实体引用 - 从脚本模块的执行日志实体引用中进行清理 - 从多个基础设施配置类中移除未使用的依赖项 - 优化测试文件中的导入声明,移除不必要的引用
21 lines
697 B
C#
21 lines
697 B
C#
using BuildFlow.Domain.Entities.KnowledgeBase;
|
|
using BuildFlow.Domain.Interfaces;
|
|
|
|
namespace BuildFlow.Rag.Tests.Stub;
|
|
|
|
/// <summary>
|
|
/// Stub IRagRetrievalService:返回预设 sources,绕过 pgvector 真实召回。
|
|
/// POC 阶段用,后续 Testcontainers 集成测试覆盖真实召回。
|
|
/// </summary>
|
|
public sealed class StubRagRetrievalService : IRagRetrievalService
|
|
{
|
|
/// <summary>预设的召回结果。</summary>
|
|
public IReadOnlyList<RetrievalHit> Hits { get; init; } = [];
|
|
|
|
public Task<List<RetrievalHit>> RetrieveAsync(
|
|
KnowledgeBaseEntity knowledgeBase,
|
|
string question,
|
|
CancellationToken ct = default)
|
|
=> Task.FromResult(Hits.ToList());
|
|
}
|