diff --git a/config-template.py b/config-template.py index 2588ca35..401526ee 100644 --- a/config-template.py +++ b/config-template.py @@ -195,6 +195,10 @@ encourage_sponsor_at_start = True # 注意:较大的prompt_submit_length会导致OpenAI账户额度消耗更快 prompt_submit_length = 2048 +# 是否在token超限报错时自动重置会话 +# 可在tips.py中编辑提示语 +auto_reset = True + # OpenAI补全API的参数 # 请在下方填写模型,程序自动选择接口 # 现已支持的模型有: diff --git a/tips-custom-template.py b/tips-custom-template.py index 09eb7f19..16740b97 100644 --- a/tips-custom-template.py +++ b/tips-custom-template.py @@ -32,3 +32,6 @@ command_err_message = "[bot]err:指令不存在:" # 会话重置提示 command_reset_message = "[bot]:会话已重置" command_reset_name_message = "[bot]:会话已重置,使用场景预设:" + +# 会话自动重置时的提示 +session_auto_reset_message = "[bot]:会话token超限,已自动重置"