diff --git a/qanything_kernel/connector/database/milvus/milvus_client.py b/qanything_kernel/connector/database/milvus/milvus_client.py index ed8fd9d7..9c8d89b3 100644 --- a/qanything_kernel/connector/database/milvus/milvus_client.py +++ b/qanything_kernel/connector/database/milvus/milvus_client.py @@ -255,7 +255,7 @@ def process_group(self, group): else: doc.page_content += " " + group_chunk_map[id] doc_score = min([group_scores_map[id] for id in id_seq if id in group_scores_map]) - doc.metadata["score"] = format(1 - doc_score / math.sqrt(2), '.4f') + doc.metadata["score"] = float(format(1 - doc_score / math.sqrt(2), '.4f')) doc.metadata["kernel"] = '|'.join([group_chunk_map[id] for id in id_seq if id in group_scores_map]) new_cands.append(doc) return new_cands