feat: support tencent vector db (#3568)

This commit is contained in:
quicksand
2024-06-14 19:25:17 +08:00
committed by GitHub
parent 9ed21737d5
commit 4080f7b8ad
16 changed files with 481 additions and 5 deletions

View File

@@ -309,6 +309,14 @@ def migrate_knowledge_vector_database():
"vector_store": {"class_prefix": collection_name}
}
dataset.index_struct = json.dumps(index_struct_dict)
elif vector_type == VectorType.TENCENT:
dataset_id = dataset.id
collection_name = Dataset.gen_collection_name_by_id(dataset_id)
index_struct_dict = {
"type": VectorType.TENCENT,
"vector_store": {"class_prefix": collection_name}
}
dataset.index_struct = json.dumps(index_struct_dict)
elif vector_type == VectorType.PGVECTOR:
dataset_id = dataset.id
collection_name = Dataset.gen_collection_name_by_id(dataset_id)