Spaces:
Runtime error
Runtime error
as-cle-bert
commited on
Commit
•
e60b3aa
1
Parent(s):
0ee9211
Update utils.py
Browse files
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,
|
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"]
|