Update app.py
Browse files
app.py
CHANGED
|
@@ -148,7 +148,10 @@ general_assistant_suche= openai_assistant_suche(client)
|
|
| 148 |
#wenn löschen Button geklickt
|
| 149 |
def clear_all(history, uploaded_file_paths, chats):
|
| 150 |
dic_history = {schluessel: wert for schluessel, wert in history}
|
| 151 |
-
summary = "\n\n".join(f'{schluessel}: \n {wert}' for schluessel, wert in dic_history.items())
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
#falls file mit summay für download existiert hat: das zunächst löschen
|
| 154 |
#cleanup(file_path_download)
|
|
|
|
| 148 |
#wenn löschen Button geklickt
|
| 149 |
def clear_all(history, uploaded_file_paths, chats):
|
| 150 |
dic_history = {schluessel: wert for schluessel, wert in history}
|
| 151 |
+
#summary = "\n\n".join(f'{schluessel}: \n {wert}' for schluessel, wert in dic_history.items())
|
| 152 |
+
#um nur für die Bennenung des Chats nicht so viele Tokens zu schicken, nur die erste Eintragung im dict nehmen
|
| 153 |
+
erster_eintrag = next(iter(dic_history.items()))
|
| 154 |
+
summary = "\n\n".join(f'{erster_eintrag[0]}: \n {erster_eintrag[1]}')
|
| 155 |
|
| 156 |
#falls file mit summay für download existiert hat: das zunächst löschen
|
| 157 |
#cleanup(file_path_download)
|