fix(milvus_kb): 修正相似度计算逻辑
移除未使用的auth_api导出并更新相关注释
This commit is contained in:
parent
3bca00a864
commit
afaba5c8cb
@ -342,7 +342,7 @@ class MilvusKB(KnowledgeBase):
|
|||||||
|
|
||||||
retrieved_chunks = []
|
retrieved_chunks = []
|
||||||
for hit in results[0]:
|
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:
|
if similarity < similarity_threshold:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
// 导出API模块
|
// 导出API模块
|
||||||
export * from './system_api' // 系统管理API
|
export * from './system_api' // 系统管理API
|
||||||
export * from './knowledge_api' // 知识库管理API
|
export * from './knowledge_api' // 知识库管理API
|
||||||
export * from './auth_api' // 认证API
|
|
||||||
export * from './graph_api' // 图谱API
|
export * from './graph_api' // 图谱API
|
||||||
export * from './tools.js' // 工具API
|
export * from './tools.js' // 工具API
|
||||||
export * from './agent.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
|
* 4. graph_api.js: 图谱API
|
||||||
* - 知识图谱相关功能
|
* - 知识图谱相关功能
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user