as-cle-bert commited on
Commit
e60b3aa
1 Parent(s): 0ee9211

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -14,9 +14,9 @@ class NeuralSearcher:
14
  collection_name=self.collection_name,
15
  query_vector=vector,
16
  query_filter=None, # If you don't want any filters for now
17
- limit=1, # 5 the most closest results is enough
18
  )
19
  # `search_result` contains found vector ids with similarity scores along with the stored payload
20
  # In this function you are interested in payload only
21
  payloads = [hit.payload for hit in search_result]
22
- return payloads["content"]
 
14
  collection_name=self.collection_name,
15
  query_vector=vector,
16
  query_filter=None, # If you don't want any filters for now
17
+ limit=1,
18
  )
19
  # `search_result` contains found vector ids with similarity scores along with the stored payload
20
  # In this function you are interested in payload only
21
  payloads = [hit.payload for hit in search_result]
22
+ return payloads[0]["content"]