Update utils.py
Browse files
utils.py
CHANGED
@@ -462,12 +462,12 @@ def rag_chain(llm, prompt, retriever):
|
|
462 |
#3. Alternative: mit pipeline
|
463 |
#für summarizatiuon
|
464 |
#answer = llm(input_text,max_length=1024, min_length=150, do_sample=False)
|
465 |
-
result = qa_pipeline(question=prompt, context=combined_content)
|
466 |
-
answer=result['answer']
|
467 |
|
468 |
# Erstelle das Ergebnis-Dictionary
|
469 |
result = {
|
470 |
-
"answer":
|
471 |
"relevant_docs": most_relevant_docs
|
472 |
}
|
473 |
else:
|
|
|
462 |
#3. Alternative: mit pipeline
|
463 |
#für summarizatiuon
|
464 |
#answer = llm(input_text,max_length=1024, min_length=150, do_sample=False)
|
465 |
+
#result = qa_pipeline(question=prompt, context=combined_content)
|
466 |
+
#answer=result['answer']
|
467 |
|
468 |
# Erstelle das Ergebnis-Dictionary
|
469 |
result = {
|
470 |
+
"answer": "Folgende relevante Dokumente wurden gefunden:",
|
471 |
"relevant_docs": most_relevant_docs
|
472 |
}
|
473 |
else:
|