Skip to content

Commit

Permalink
chore: fix wrong VectorType match case (langgenius#8857)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoice authored and JunXu01 committed Nov 9, 2024
1 parent 15a7dc8 commit 02e026f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/controllers/console/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,10 @@ def get(self):
case (
VectorType.MILVUS
| VectorType.RELYT
| VectorType.PGVECTOR
| VectorType.TIDB_VECTOR
| VectorType.CHROMA
| VectorType.TENCENT
| VectorType.PGVECTO_RS
):
return {"retrieval_method": [RetrievalMethod.SEMANTIC_SEARCH.value]}
case (
Expand All @@ -577,6 +577,7 @@ def get(self):
| VectorType.MYSCALE
| VectorType.ORACLE
| VectorType.ELASTICSEARCH
| VectorType.PGVECTOR
):
return {
"retrieval_method": [
Expand Down
2 changes: 1 addition & 1 deletion api/core/rag/datasource/vdb/tencent/tencent_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _init_database(self):
return self._client.create_database(database_name=self._client_config.database)

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

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

0 comments on commit 02e026f

Please sign in to comment.