Update app.py
Browse files
app.py
CHANGED
|
@@ -231,12 +231,19 @@ def create_assistant_file(prompt, file):
|
|
| 231 |
#openassistant um im Netz zu suchen
|
| 232 |
def create_assistant_suche(prompt):
|
| 233 |
global client, general_assistant_suche
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
#neues Thread mit akt. prompt dem Assistant hinzufügen
|
| 235 |
thread_suche, run = create_thread_and_run(prompt, client, general_assistant_suche.id)
|
| 236 |
run = wait_on_run(run, thread_suche, client)
|
| 237 |
response = get_response(thread_suche, client, general_assistant_suche.id)
|
| 238 |
result = response.data[1].content[0].text.value
|
|
|
|
| 239 |
#Alternativ duckduckgo_search????????????????????????????????????????
|
|
|
|
| 240 |
return result
|
| 241 |
|
| 242 |
###################################################
|
|
|
|
| 231 |
#openassistant um im Netz zu suchen
|
| 232 |
def create_assistant_suche(prompt):
|
| 233 |
global client, general_assistant_suche
|
| 234 |
+
|
| 235 |
+
retriever = TavilySearchAPIRetriever(k=4)
|
| 236 |
+
result = retriever.invoke(prompt)
|
| 237 |
+
|
| 238 |
+
"""
|
| 239 |
#neues Thread mit akt. prompt dem Assistant hinzufügen
|
| 240 |
thread_suche, run = create_thread_and_run(prompt, client, general_assistant_suche.id)
|
| 241 |
run = wait_on_run(run, thread_suche, client)
|
| 242 |
response = get_response(thread_suche, client, general_assistant_suche.id)
|
| 243 |
result = response.data[1].content[0].text.value
|
| 244 |
+
"""
|
| 245 |
#Alternativ duckduckgo_search????????????????????????????????????????
|
| 246 |
+
|
| 247 |
return result
|
| 248 |
|
| 249 |
###################################################
|