Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -231,6 +231,10 @@ def get_file(source_documents):
|
|
| 231 |
# # ── Build once at startup (not per Gradio call) ───────────────────────────────
|
| 232 |
# chain, retriever = build_chain(vectordb) # vectordb initialised elsewhere
|
| 233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
|
| 235 |
# Query Re-write
|
| 236 |
def rewrite_query(question: str, llm) -> str:
|
|
|
|
| 231 |
# # ── Build once at startup (not per Gradio call) ───────────────────────────────
|
| 232 |
# chain, retriever = build_chain(vectordb) # vectordb initialised elsewhere
|
| 233 |
|
| 234 |
+
retriever = vectordb.as_retriever(
|
| 235 |
+
search_type="mmr",
|
| 236 |
+
search_kwargs={"k": 3, "lambda_mult": 0.5, "fetch_k": 15},
|
| 237 |
+
|
| 238 |
|
| 239 |
# Query Re-write
|
| 240 |
def rewrite_query(question: str, llm) -> str:
|