From da8bacb8d06a9408ffb2ca61d0e3d3d64386f6ed Mon Sep 17 00:00:00 2001 From: surviffer <97140625+surviffer@users.noreply.github.com> Date: Sat, 31 Aug 2024 05:02:37 +0800 Subject: [PATCH] fix: tencentvectordb inconsistent attribute name (#15733) --- .../llama_index/vector_stores/tencentvectordb/base.py | 8 ++++---- .../pyproject.toml | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/llama_index/vector_stores/tencentvectordb/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/llama_index/vector_stores/tencentvectordb/base.py index ffe736ef7bec8..10d525f2d16e4 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/llama_index/vector_stores/tencentvectordb/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/llama_index/vector_stores/tencentvectordb/base.py @@ -278,7 +278,7 @@ def _create_collection( collection_name: str = self._compute_collection_name( database_name, collection_params ) - collection_description = collection_params.collection_description + collection_description = collection_params._collection_description if collection_params is None: raise ValueError(VALUE_NONE_ERROR.format("collection_params")) @@ -300,9 +300,9 @@ def _compute_collection_name( database_name: str, collection_params: CollectionParams ) -> str: if database_name == DEFAULT_DATABASE_NAME: - return collection_params.collection_name - if collection_params.collection_name != DEFAULT_COLLECTION_NAME: - return collection_params.collection_name + return collection_params._collection_name + if collection_params._collection_name != DEFAULT_COLLECTION_NAME: + return collection_params._collection_name else: return database_name + "_" + DEFAULT_COLLECTION_NAME diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/pyproject.toml b/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/pyproject.toml index 472ce49116b39..85aad2ff12658 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/pyproject.toml +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-tencentvectordb/pyproject.toml @@ -27,11 +27,12 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-vector-stores-tencentvectordb" readme = "README.md" -version = "0.2.0" +version = "0.2.1" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" llama-index-core = "^0.11.0" +tcvectordb = "^1.3.13" [tool.poetry.group.dev.dependencies] ipython = "8.10.0"