derful commited on
Commit
fb84aad
·
1 Parent(s): cfc4b24

Update toolbox.py

Browse files
Files changed (1) hide show
  1. toolbox.py +2 -2
toolbox.py CHANGED
@@ -2,7 +2,7 @@ import markdown, mdtex2html, threading
2
  from show_math import convert as convert_math
3
  from functools import wraps
4
 
5
- def predict_no_ui_but_counting_down(i_say, i_say_show_user, chatbot, top_p, temperature, history=[], sys_prompt=''):
6
  """
7
  调用简单的predict_no_ui接口,但是依然保留了些许界面心跳功能,当对话太长时,会自动采用二分法截断
8
  """
@@ -17,7 +17,7 @@ def predict_no_ui_but_counting_down(i_say, i_say_show_user, chatbot, top_p, temp
17
  def mt(i_say, history):
18
  while True:
19
  try:
20
- mutable[0] = predict_no_ui(inputs=i_say, top_p=top_p, temperature=temperature, history=history, sys_prompt=sys_prompt)
21
  break
22
  except ConnectionAbortedError as e:
23
  if len(history) > 0:
 
2
  from show_math import convert as convert_math
3
  from functools import wraps
4
 
5
+ def predict_no_ui_but_counting_down(api, i_say, i_say_show_user, chatbot, top_p, temperature, history=[], sys_prompt=''):
6
  """
7
  调用简单的predict_no_ui接口,但是依然保留了些许界面心跳功能,当对话太长时,会自动采用二分法截断
8
  """
 
17
  def mt(i_say, history):
18
  while True:
19
  try:
20
+ mutable[0] = predict_no_ui(api, inputs=i_say, top_p=top_p, temperature=temperature, history=history, sys_prompt=sys_prompt)
21
  break
22
  except ConnectionAbortedError as e:
23
  if len(history) > 0: