AFischer1985 commited on
Commit
59cb099
1 Parent(s): 15a6744

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +4 -4
run.py CHANGED
@@ -255,7 +255,7 @@ def response(message, history):
255
  if (settings=="Permanent"):
256
  if((len(history)==0)&(os.path.isfile(filename))): history=json.load(open(filename,'r',encoding="utf-8")) # retrieve history (if available)
257
 
258
- system="Du bist ein deutschsprachiges wortkarges KI-basiertes Assistenzsystem. Fasse dich kurz."
259
 
260
  #RAG-layer 0: Intention-RAG
261
  #---------------------------
@@ -318,7 +318,7 @@ def response(message, history):
318
  combination = [' '.join(triplets) for triplets in combination]
319
  #print(combination)
320
  rag="\n\n"
321
- rag += "Beziehe dich in deiner Fortsetzung des Dialogs AUSSCHLIEßLICH auf die folgenden Informationen:\n"
322
  rag += str(texts)
323
  rag += "\n\nIm Folgenden siehst du den jüngsten Dialog-Verlauf:"
324
 
@@ -381,7 +381,7 @@ def response(message, history):
381
  print(part, end="", flush=True)
382
  response += part
383
  yield response
384
- if((myType=="1a")|(myType=="1b")): #add RAG-results to chat-output if appropriate
385
  response=response+"\n\n<br><details><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
386
  yield response
387
  history.append((message, response)) # add current dialog to history
@@ -430,7 +430,7 @@ def response(message, history):
430
  print("Exception:"+str(e))
431
  pass
432
  yield response
433
- if((myType=="1a")|(myType=="1b")): #add RAG-results to chat-output if appropriate
434
  response=response+"\n\n<br><details><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
435
  yield response
436
  history.append((message, response)) # add current dialog to history
 
255
  if (settings=="Permanent"):
256
  if((len(history)==0)&(os.path.isfile(filename))): history=json.load(open(filename,'r',encoding="utf-8")) # retrieve history (if available)
257
 
258
+ system="Du bist ein deutschsprachiges wortkarges KI-basiertes Assistenzsystem. Fasse dich kurz und verzichte auf Codebeispiele."
259
 
260
  #RAG-layer 0: Intention-RAG
261
  #---------------------------
 
318
  combination = [' '.join(triplets) for triplets in combination]
319
  #print(combination)
320
  rag="\n\n"
321
+ rag += "Beziehe dich in deiner Fortsetzung des Dialogs AUSSCHLIEßLICH auf die folgenden Informationen und gebe keine weiteren Informationen heraus:\n"
322
  rag += str(texts)
323
  rag += "\n\nIm Folgenden siehst du den jüngsten Dialog-Verlauf:"
324
 
 
381
  print(part, end="", flush=True)
382
  response += part
383
  yield response
384
+ if((myType=="1a")): #add RAG-results to chat-output if appropriate
385
  response=response+"\n\n<br><details><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
386
  yield response
387
  history.append((message, response)) # add current dialog to history
 
430
  print("Exception:"+str(e))
431
  pass
432
  yield response
433
+ if((myType=="1a")): #add RAG-results to chat-output if appropriate
434
  response=response+"\n\n<br><details><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
435
  yield response
436
  history.append((message, response)) # add current dialog to history