fix(milvus_kb): 修正相似度计算逻辑

移除未使用的auth_api导出并更新相关注释
This commit is contained in:
Wenjie Zhang 2025-08-25 02:26:50 +08:00
parent 3bca00a864
commit afaba5c8cb
2 changed files with 1 additions and 4 deletions

View File

@ -342,7 +342,7 @@ class MilvusKB(KnowledgeBase):
retrieved_chunks = []
for hit in results[0]:
similarity = 1 - hit.distance if metric_type == "COSINE" else 1 / (1 + hit.distance)
similarity = hit.distance if metric_type == "COSINE" else 1 / (1 + hit.distance)
if similarity < similarity_threshold:
continue

View File

@ -6,7 +6,6 @@
// 导出API模块
export * from './system_api' // 系统管理API
export * from './knowledge_api' // 知识库管理API
export * from './auth_api' // 认证API
export * from './graph_api' // 图谱API
export * from './tools.js' // 工具API
export * from './agent.js' // 智能体API
@ -27,8 +26,6 @@ export { apiGet, apiPost, apiPut, apiDelete,
* - 数据库管理文档管理查询接口文件管理
* - 权限要求: 管理员权限
*
* 3. auth_api.js: 认证API
* - 用户认证用户管理
*
* 4. graph_api.js: 图谱API
* - 知识图谱相关功能