alexkueck commited on
Commit
14df361
·
verified ·
1 Parent(s): 13b226d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -269,8 +269,10 @@ def generate_auswahl(prompt_in, file, file_history, chatbot, history, anzahl_doc
269
 
270
  #File hochladen in Chroma und dann Antwort generieren
271
  results = generate_text_zu_doc(neu_file, prompt, k, rag_option, chatbot, history, vektordatenbank)
 
 
272
  summary = "Zusammenfassung: \n" + str(results['answer']) + "\n Aus den Dokumenten: \n"
273
- summary += " ".join([doc["content"] for doc in results['relevant_docs']])
274
  print("summary:....................." + summary)
275
  history = history + [[prompt_in, summary]]
276
  print("history.........................."+str(history))
 
269
 
270
  #File hochladen in Chroma und dann Antwort generieren
271
  results = generate_text_zu_doc(neu_file, prompt, k, rag_option, chatbot, history, vektordatenbank)
272
+
273
+ #Ergebnisse für history und chatbot zusammenstellen
274
  summary = "Zusammenfassung: \n" + str(results['answer']) + "\n Aus den Dokumenten: \n"
275
+ summary += " ".join(['Dokument: ' + str(doc['path']) + 'Seite: ' + str(doc['page']) + '\nAuschnitt: ' + str(doc["content"]) for doc in results['relevant_docs']])
276
  print("summary:....................." + summary)
277
  history = history + [[prompt_in, summary]]
278
  print("history.........................."+str(history))