AFischer1985 commited on
Commit
e2cc3e5
1 Parent(s): da429cd

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +5 -5
run.py CHANGED
@@ -352,7 +352,7 @@ def response(message, history):
352
  system2, # fictive first words of the AI (neither displayed nor stored)
353
  historylimit=historylimit # number of past messages to consider for response to current message
354
  )
355
- print("\n\nPrompt:\n"+prompt)
356
 
357
  ## Request response from model
358
  #------------------------------
@@ -382,8 +382,8 @@ def response(message, history):
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
388
  # Store current state in DB if settings=="Permanent"
389
  if (settings=="Permanent"):
@@ -431,8 +431,8 @@ def response(message, history):
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
437
  # Store current state in DB if settings=="Permanent"
438
  if (settings=="Permanent"):
 
352
  system2, # fictive first words of the AI (neither displayed nor stored)
353
  historylimit=historylimit # number of past messages to consider for response to current message
354
  )
355
+ print("\n\n*** Prompt:\n"+prompt+"\n***\n\n")
356
 
357
  ## Request response from model
358
  #------------------------------
 
382
  response += part
383
  yield response
384
  if((myType=="1a")): #add RAG-results to chat-output if appropriate
385
+ response2=response+"\n\n<br><details><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
386
+ yield response2
387
  history.append((message, response)) # add current dialog to history
388
  # Store current state in DB if settings=="Permanent"
389
  if (settings=="Permanent"):
 
431
  pass
432
  yield response
433
  if((myType=="1a")): #add RAG-results to chat-output if appropriate
434
+ response2=response+"\n\n<br><details><summary><strong>Sources</strong></summary><br><ul>"+ "".join(["<li>" + s + "</li>" for s in combination])+"</ul></details>"
435
+ yield response2
436
  history.append((message, response)) # add current dialog to history
437
  # Store current state in DB if settings=="Permanent"
438
  if (settings=="Permanent"):