浏览代码

FEAT: Tencent Vector search supports backward compatibility with the previous score calculation approach. (#22820)

Co-authored-by: wlleiiwang <wlleiiwang@tencent.com>
tags/1.7.0
wlleiiwang 3 个月前
父节点
当前提交
b4e152f775
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      api/core/rag/datasource/vdb/tencent/tencent_vector.py

+ 2
- 1
api/core/rag/datasource/vdb/tencent/tencent_vector.py 查看文件

@@ -284,7 +284,8 @@ class TencentVector(BaseVector):
# Compatible with version 1.1.3 and below.
meta = json.loads(meta)
score = 1 - result.get("score", 0.0)
score = result.get("score", 0.0)
else:
score = result.get("score", 0.0)
if score > score_threshold:
meta["score"] = score
doc = Document(page_content=result.get(self.field_text), metadata=meta)

正在加载...
取消
保存