Spaces:
Paused
Paused
themissingCRAM
commited on
Commit
·
6004c9d
1
Parent(s):
8b3bc7d
chroma db
Browse files
app.py
CHANGED
|
@@ -70,9 +70,8 @@ class RetrieverTool(Tool):
|
|
| 70 |
)
|
| 71 |
self.collection = collection
|
| 72 |
|
| 73 |
-
def forward(self, query:
|
| 74 |
-
|
| 75 |
-
|
| 76 |
docs = self.collection.query(query, n_results=5)
|
| 77 |
retrieved_text = "\nRetrieved documents:\n" + "".join(
|
| 78 |
[
|
|
|
|
| 70 |
)
|
| 71 |
self.collection = collection
|
| 72 |
|
| 73 |
+
def forward(self, query: str) -> str:
|
| 74 |
+
assert isinstance(query, str), "Your search query must be a string"
|
|
|
|
| 75 |
docs = self.collection.query(query, n_results=5)
|
| 76 |
retrieved_text = "\nRetrieved documents:\n" + "".join(
|
| 77 |
[
|