byte-vortex commited on
Commit
ac51fbf
·
verified ·
1 Parent(s): c7c39f9

Deploy Myco from CI

Browse files
Files changed (1) hide show
  1. game/engine.py +2 -2
game/engine.py CHANGED
@@ -255,10 +255,10 @@ def myco_reply(message=None, history=None, current=None, collection=None, positi
255
  if not clean_message:
256
  return "", current_history
257
 
258
- next_history = [*current_history, {"role": "user", "content": clean_message}]
259
  context = _companion_context(current, collection, current_history, position)
260
  answer = _companion_answer(clean_message, current, context)
261
- return "", [*next_history, _assistant_message(answer)]
262
 
263
 
264
  companion_reply = myco_reply
 
255
  if not clean_message:
256
  return "", current_history
257
 
258
+ next_history = [*current_history, (clean_message, None)]
259
  context = _companion_context(current, collection, current_history, position)
260
  answer = _companion_answer(clean_message, current, context)
261
+ return "", [*next_history[:-1], (clean_message, answer)]
262
 
263
 
264
  companion_reply = myco_reply