feat: 知识库设置页面增加 retrieval_model 检索配置功能

1. 召回测试页面增加 Score 阈值参数配置
2. 知识库设置页面新增检索模型配置:
   - 检索方式 (向量/全文/混合/关键字检索)
   - Reranking 模型 (默认开启,不可关闭)
   - Top K 返回数量
   - Score 阈值 (默认开启,可调节数值)
3. 修复 Dify API 字段名问题 (retrieval_model_dict)
4. 优化数据加载流程,使用详情接口获取完整配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-05 22:07:16 +08:00
parent 5f9ce2fe9f
commit d53742948d
9 changed files with 477 additions and 65 deletions
@@ -21,6 +21,8 @@ export type SearchMethod = 'semantic_search' | 'full_text_search' | 'hybrid_sear
export interface RetrieveOptions {
searchMethod: SearchMethod;
topK: number;
scoreThresholdEnabled: boolean;
scoreThreshold: number;
}
/**
@@ -32,4 +34,6 @@ export interface RetrieveTestState {
retrieving: boolean;
searchMethod: SearchMethod;
topK: number;
scoreThresholdEnabled: boolean;
scoreThreshold: number;
}