@@ -95,7 +95,7 @@ def create_db_collection_if_not_exists(self):
95
95
# create collection
96
96
def create_collection (self ):
97
97
log .warning (f'Creating collection "{ self .collection_name } " ...' )
98
- self .client .recreate_collection (
98
+ self .client .create_collection (
99
99
collection_name = self .collection_name ,
100
100
vectors_config = VectorParams (
101
101
size = self .embedder_size , distance = Distance .COSINE
@@ -107,7 +107,6 @@ def create_collection(self):
107
107
type = ScalarType .INT8 , quantile = 0.95 , always_ram = True
108
108
)
109
109
),
110
- # shard_number=3,
111
110
)
112
111
113
112
self .client .update_collection_aliases (
@@ -219,9 +218,9 @@ def recall_memories_from_embedding(
219
218
):
220
219
"""Retrieve similar memories from embedding"""
221
220
222
- memories = self .client .search (
221
+ memories = self .client .query_points (
223
222
collection_name = self .collection_name ,
224
- query_vector = embedding ,
223
+ query = embedding ,
225
224
query_filter = self ._qdrant_filter_from_dict (metadata ),
226
225
with_payload = True ,
227
226
with_vectors = True ,
@@ -234,7 +233,7 @@ def recall_memories_from_embedding(
234
233
oversampling = 2.0 , # Available as of v1.3.0
235
234
)
236
235
),
237
- )
236
+ ). points
238
237
239
238
# convert Qdrant points to langchain.Document
240
239
langchain_documents_from_points = []
0 commit comments