@@ -95,7 +95,7 @@ def create_db_collection_if_not_exists(self):
9595 # create collection
9696 def create_collection (self ):
9797 log .warning (f'Creating collection "{ self .collection_name } " ...' )
98- self .client .recreate_collection (
98+ self .client .create_collection (
9999 collection_name = self .collection_name ,
100100 vectors_config = VectorParams (
101101 size = self .embedder_size , distance = Distance .COSINE
@@ -107,7 +107,6 @@ def create_collection(self):
107107 type = ScalarType .INT8 , quantile = 0.95 , always_ram = True
108108 )
109109 ),
110- # shard_number=3,
111110 )
112111
113112 self .client .update_collection_aliases (
@@ -219,9 +218,9 @@ def recall_memories_from_embedding(
219218 ):
220219 """Retrieve similar memories from embedding"""
221220
222- memories = self .client .search (
221+ memories = self .client .query_points (
223222 collection_name = self .collection_name ,
224- query_vector = embedding ,
223+ query = embedding ,
225224 query_filter = self ._qdrant_filter_from_dict (metadata ),
226225 with_payload = True ,
227226 with_vectors = True ,
@@ -234,7 +233,7 @@ def recall_memories_from_embedding(
234233 oversampling = 2.0 , # Available as of v1.3.0
235234 )
236235 ),
237- )
236+ ). points
238237
239238 # convert Qdrant points to langchain.Document
240239 langchain_documents_from_points = []
0 commit comments