From 2f2159239a013c99404ce8d53aafb17ee496d75e Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Thu, 8 Jun 2023 13:20:33 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E5=92=8C=E6=8F=90=E7=A4=BA=E8=AF=AD=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-template.py | 4 ++++ tips-custom-template.py | 3 +++ 2 files changed, 7 insertions(+) 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超限,已自动重置"