🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
fix(storages): Replace deprecated `search` method with `query_points` (#1794)
Lei Zhang495c3ebe25d4
diff --git a/camel/storages/vectordb_storages/qdrant.py b/camel/storages/vectordb_storages/qdrant.pyindex 12a66b236..8aec17a36 100644--- a/camel/storages/vectordb_storages/qdrant.py+++ b/camel/storages/vectordb_storages/qdrant.py@@ -450,9 +450,9 @@ class QdrantStorage(BaseVectorStorage):search_filter = Filter(must=cast(List[Condition], must_conditions))# Execute the search with optional filter- search_result = self._client.search(+ search_result = self._client.query_points(collection_name=self.collection_name,- query_vector=query.query_vector,+ query=query.query_vector,with_payload=True,with_vectors=True,limit=query.top_k,@@ -467,7 +467,7 @@ class QdrantStorage(BaseVectorStorage):payload=point.payload,vector=point.vector, # type: ignore[arg-type])- for point in search_result+ for point in search_result.points]return query_resultsdiff --git a/test/loaders/test_pandaai.py b/test/loaders/test_pandaai.pyindex 4f87f6fd3..fd19e94e3 100644--- a/test/loaders/test_pandaai.py+++ b/test/loaders/test_pandaai.py@@ -47,6 +47,9 @@ def test_topk():}doc = reader.load(pd.DataFrame(sales_by_country))resp: pd.DataFrame = doc.chat("Which are the top 5 countries by sales?")+ assert isinstance(+ resp, pd.DataFrame+ ), f"Expected a DataFrame but got: {resp}"assert resp["country"].tolist() == ["China","United States",