mirror of
https://github.com/langgenius/dify.git
synced 2025-09-19 22:23:52 +00:00
FEAT: Tencent Vector search supports backward compatibility with the previous score calculation approach. (#22820)
Co-authored-by: wlleiiwang <wlleiiwang@tencent.com>
This commit is contained in:
parent
eaae79a581
commit
b4e152f775
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user