Update app.py
Browse files
app.py
CHANGED
|
@@ -455,9 +455,10 @@ def generate_text (prompt, chatbot, history, rag_option, model_option, openai_ap
|
|
| 455 |
splittet = False
|
| 456 |
print("LLM aufrufen ohne RAG: ...........")
|
| 457 |
result = llm_chain(llm, history_text_und_prompt)
|
| 458 |
-
|
|
|
|
| 459 |
#Wenn keine Antwort möglich "Ich weiß es nicht" etc., dann versuchen mit Suche im Internet.
|
| 460 |
-
if is_response_similar(result):
|
| 461 |
print("Suche im Netz: ...........")
|
| 462 |
suche_im_Netz="Antwort aus dem Internet ..."
|
| 463 |
result = create_assistant_suche(prompt)
|
|
|
|
| 455 |
splittet = False
|
| 456 |
print("LLM aufrufen ohne RAG: ...........")
|
| 457 |
result = llm_chain(llm, history_text_und_prompt)
|
| 458 |
+
print("result llm ohne rag:...................")
|
| 459 |
+
print(result)
|
| 460 |
#Wenn keine Antwort möglich "Ich weiß es nicht" etc., dann versuchen mit Suche im Internet.
|
| 461 |
+
if (result == None or is_response_similar(result)):
|
| 462 |
print("Suche im Netz: ...........")
|
| 463 |
suche_im_Netz="Antwort aus dem Internet ..."
|
| 464 |
result = create_assistant_suche(prompt)
|