MikeMann commited on
Commit
d44815c
·
1 Parent(s): 6f9dddd

fixed response

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -539,13 +539,12 @@ if __name__ == '__main__':
539
  print(f"DBG: ragQuery hist -1:{history[-1].get('content')}")
540
  print(f"DBG: ragQuery hist 0:{history[0].get('content')}")
541
  print(f"DBG: fullHistory: {history}" )
542
- #bot_response = bot.ragPromptRemote(history[-1].get('content'), reranking, history)
543
- bot_response = bot.ragPromptRemote(history[-1]["choices"][0]["message"]["content"], reranking, history)
544
  history.append({"role": "assistant", "content": ""})
545
 
546
  image_gallery = returnImages()
547
 
548
- for token in bot_response:
549
  if "eot_id" in token:
550
  token = token.replace("<|eot_id|>","")
551
  if token.startswith("-"):
 
539
  print(f"DBG: ragQuery hist -1:{history[-1].get('content')}")
540
  print(f"DBG: ragQuery hist 0:{history[0].get('content')}")
541
  print(f"DBG: fullHistory: {history}" )
542
+ bot_response = bot.ragPromptRemote(history[-1].get('content'), reranking, history)
 
543
  history.append({"role": "assistant", "content": ""})
544
 
545
  image_gallery = returnImages()
546
 
547
+ for token in bot_response["choices"][0]["message"]["content"]:
548
  if "eot_id" in token:
549
  token = token.replace("<|eot_id|>","")
550
  if token.startswith("-"):