Limour commited on
Commit
e653251
1 Parent(s): 1d9b468

Upload 2 files

Browse files
Files changed (2) hide show
  1. mods/btn_rag.py +1 -1
  2. mods/btn_submit.py +1 -1
mods/btn_rag.py CHANGED
@@ -30,7 +30,7 @@ def init(cfg):
30
  # ========== 需要临时注入的内容 ==========
31
  model.venv_create('rag')
32
  t_rag = chat_template('system', _rag)
33
- model.eval_t(t_rag, _n_keep, _n_discard)
34
  yield model.venv_info
35
 
36
  cfg['btn_rag_fn'] = {
 
30
  # ========== 需要临时注入的内容 ==========
31
  model.venv_create('rag')
32
  t_rag = chat_template('system', _rag)
33
+ model.eval_t(t_rag, _n_keep, _n_discard, chat_template.im_start_token)
34
  yield model.venv_info
35
 
36
  cfg['btn_rag_fn'] = {
mods/btn_submit.py CHANGED
@@ -36,7 +36,7 @@ def init(cfg):
36
  model.venv_create('usr')
37
  t_msg = history[-1][0]
38
  t_msg = chat_template(_usr, t_msg)
39
- model.eval_t(t_msg, _n_keep, _n_discard)
40
  yield history, model.venv_info
41
  # ========== 模型输出 ==========
42
  if cfg['btn_stop_status']:
 
36
  model.venv_create('usr')
37
  t_msg = history[-1][0]
38
  t_msg = chat_template(_usr, t_msg)
39
+ model.eval_t(t_msg, _n_keep, _n_discard, chat_template.im_start_token)
40
  yield history, model.venv_info
41
  # ========== 模型输出 ==========
42
  if cfg['btn_stop_status']: