alexkueck commited on
Commit
15f4cdd
1 Parent(s): 2e94f1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -275,7 +275,7 @@ def generate_auswahl(prompt, file, chatbot, history, rag_option, model_option, o
275
  status = "Antwort der KI ..."
276
  if (file == None):
277
  result, status = generate_text(prompt, chatbot, history, rag_option, model_option, openai_api_key, db, k=3, top_p=0.6, temperature=0.5, max_new_tokens=4048, max_context_length_tokens=2048, repetition_penalty=1.3,)
278
- history = history + [(prompt, result)]
279
  else:
280
  #Es wurde ein Bild angehängt -> wenn prompt dazu, das Bild analysieren
281
  #geht nur über spezielle OpenAI-Schnittstelle...
@@ -285,7 +285,7 @@ def generate_auswahl(prompt, file, chatbot, history, rag_option, model_option, o
285
  else:
286
  result = generate_text_zu_doc(file, prompt, k, rag_option, chatbot, db)
287
 
288
- history = history + [((file,), None),(prompt, result)]
289
  print ("history ....................")
290
  print(history)
291
  print ("chatbot ....................")
 
275
  status = "Antwort der KI ..."
276
  if (file == None):
277
  result, status = generate_text(prompt, chatbot, history, rag_option, model_option, openai_api_key, db, k=3, top_p=0.6, temperature=0.5, max_new_tokens=4048, max_context_length_tokens=2048, repetition_penalty=1.3,)
278
+ history = history + [[prompt, result]]
279
  else:
280
  #Es wurde ein Bild angehängt -> wenn prompt dazu, das Bild analysieren
281
  #geht nur über spezielle OpenAI-Schnittstelle...
 
285
  else:
286
  result = generate_text_zu_doc(file, prompt, k, rag_option, chatbot, db)
287
 
288
+ history = history + [[(file,), None],[prompt, result]]
289
  print ("history ....................")
290
  print(history)
291
  print ("chatbot ....................")