Update app.py
Browse files
app.py
CHANGED
@@ -323,14 +323,9 @@ def generate_auswahl(prompt_in, file, file_history, chatbot, history, anzahl_doc
|
|
323 |
|
324 |
#File hochladen in Chroma und dann Antwort generieren
|
325 |
results = generate_text_zu_doc(neu_file, prompt, k, rag_option, chatbot, history, vektordatenbank)
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
for text in results_dictionary:
|
330 |
-
print("text..............."+str(text))
|
331 |
-
entry = create_history_entry(text['page_content'], text['metadata'])
|
332 |
-
print("hier...........................")
|
333 |
-
history = history + [[prompt_in, entry]]
|
334 |
|
335 |
return chatbot, history, None, file_history, ""
|
336 |
|
|
|
323 |
|
324 |
#File hochladen in Chroma und dann Antwort generieren
|
325 |
results = generate_text_zu_doc(neu_file, prompt, k, rag_option, chatbot, history, vektordatenbank)
|
326 |
+
summary = ""
|
327 |
+
summary += " ".join([doc["content"] for doc in results['relevant_docs'])
|
328 |
+
history = history + [[prompt_in, summary]]
|
|
|
|
|
|
|
|
|
|
|
329 |
|
330 |
return chatbot, history, None, file_history, ""
|
331 |
|