Browse Source

chore: fix wrong VectorType match case (#8857)

tags/0.9.0
ice yao 1 year ago
parent
commit
27e33fb15c
No account linked to committer's email address

+ 2
- 1
api/controllers/console/datasets/datasets.py View File

case ( case (
VectorType.MILVUS VectorType.MILVUS
| VectorType.RELYT | VectorType.RELYT
| VectorType.PGVECTOR
| VectorType.TIDB_VECTOR | VectorType.TIDB_VECTOR
| VectorType.CHROMA | VectorType.CHROMA
| VectorType.TENCENT | VectorType.TENCENT
| VectorType.PGVECTO_RS
): ):
return {"retrieval_method": [RetrievalMethod.SEMANTIC_SEARCH.value]} return {"retrieval_method": [RetrievalMethod.SEMANTIC_SEARCH.value]}
case ( case (
| VectorType.MYSCALE | VectorType.MYSCALE
| VectorType.ORACLE | VectorType.ORACLE
| VectorType.ELASTICSEARCH | VectorType.ELASTICSEARCH
| VectorType.PGVECTOR
): ):
return { return {
"retrieval_method": [ "retrieval_method": [

+ 1
- 1
api/core/rag/datasource/vdb/tencent/tencent_vector.py View File

return self._client.create_database(database_name=self._client_config.database) return self._client.create_database(database_name=self._client_config.database)


def get_type(self) -> str: def get_type(self) -> str:
return "tencent"
return VectorType.TENCENT


def to_index_struct(self) -> dict: def to_index_struct(self) -> dict:
return {"type": self.get_type(), "vector_store": {"class_prefix": self._collection_name}} return {"type": self.get_type(), "vector_store": {"class_prefix": self._collection_name}}

Loading…
Cancel
Save