Spaces:
Runtime error
Runtime error
J.P. Pérez Tejada commited on
Commit ·
5081325
1
Parent(s): 2a7f012
Join relevant results
Browse files- gnosis/search.py +2 -1
gnosis/search.py
CHANGED
|
@@ -11,7 +11,8 @@ class Search:
|
|
| 11 |
def run(self, query: str):
|
| 12 |
"""Run the Agent"""
|
| 13 |
collection = self.chroma_db.get_collection("pdf-explainer")
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
def collection_name(self):
|
| 17 |
"""Return the collection name"""
|
|
|
|
| 11 |
def run(self, query: str):
|
| 12 |
"""Run the Agent"""
|
| 13 |
collection = self.chroma_db.get_collection("pdf-explainer")
|
| 14 |
+
results = collection.query(query_texts=[query], n_results=3)["documents"][0]
|
| 15 |
+
return "\n\n---\n\n".join(results)
|
| 16 |
|
| 17 |
def collection_name(self):
|
| 18 |
"""Return the collection name"""
|