Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -235,9 +235,10 @@ def create_assistant_suche(prompt):
|
|
235 |
#global client, general_assistant_suche
|
236 |
|
237 |
retriever = TavilySearchAPIRetriever(k=4)
|
238 |
-
result = retriever.invoke(
|
|
|
239 |
print ("result........................")
|
240 |
-
print(
|
241 |
"""
|
242 |
#neues Thread mit akt. prompt dem Assistant hinzufügen
|
243 |
thread_suche, run = create_thread_and_run(prompt, client, general_assistant_suche.id)
|
@@ -432,7 +433,7 @@ def generate_text (prompt, chatbot, history, rag_option, model_option, openai_ap
|
|
432 |
if is_response_similar(result):
|
433 |
print("Suche im Netz: ...........")
|
434 |
suche_im_Netz="Antwort aus dem Internet ..."
|
435 |
-
result = create_assistant_suche(
|
436 |
|
437 |
except Exception as e:
|
438 |
raise gr.Error(e)
|
|
|
235 |
#global client, general_assistant_suche
|
236 |
|
237 |
retriever = TavilySearchAPIRetriever(k=4)
|
238 |
+
result = retriever.invoke(prompt)
|
239 |
+
erg = result[0].page_content
|
240 |
print ("result........................")
|
241 |
+
print(erg)
|
242 |
"""
|
243 |
#neues Thread mit akt. prompt dem Assistant hinzufügen
|
244 |
thread_suche, run = create_thread_and_run(prompt, client, general_assistant_suche.id)
|
|
|
433 |
if is_response_similar(result):
|
434 |
print("Suche im Netz: ...........")
|
435 |
suche_im_Netz="Antwort aus dem Internet ..."
|
436 |
+
result = create_assistant_suche(prompt)
|
437 |
|
438 |
except Exception as e:
|
439 |
raise gr.Error(e)
|