Spaces:
Sleeping
Sleeping
Commit ·
6155057
1
Parent(s): 191c2df
fixed docs
Browse files- src/rag.py +2 -1
src/rag.py
CHANGED
|
@@ -146,7 +146,8 @@ class FaissDB:
|
|
| 146 |
def similarity_search(self, query: str, k: int = 5):
|
| 147 |
if self.index is None:
|
| 148 |
raise ValueError("Index is not initialized")
|
| 149 |
-
|
|
|
|
| 150 |
|
| 151 |
|
| 152 |
class AICompletion:
|
|
|
|
| 146 |
def similarity_search(self, query: str, k: int = 5):
|
| 147 |
if self.index is None:
|
| 148 |
raise ValueError("Index is not initialized")
|
| 149 |
+
documents = self.index.similarity_search(query, k)
|
| 150 |
+
return [doc.page_content for doc in documents]
|
| 151 |
|
| 152 |
|
| 153 |
class AICompletion:
|