mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
Signed-off-by: 26751 <2675174581@qq.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import tips_custom
|
||||||
from ..mgr import AbstractCommandNode, Context
|
from ..mgr import AbstractCommandNode, Context
|
||||||
|
|
||||||
import pkg.openai.session
|
import pkg.openai.session
|
||||||
@@ -22,12 +23,12 @@ class ResetCommand(AbstractCommandNode):
|
|||||||
|
|
||||||
if len(params) == 0:
|
if len(params) == 0:
|
||||||
pkg.openai.session.get_session(session_name).reset(explicit=True)
|
pkg.openai.session.get_session(session_name).reset(explicit=True)
|
||||||
reply = ["[bot]会话已重置"]
|
reply = tips_custom.command_reset_message
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
import pkg.openai.dprompt as dprompt
|
import pkg.openai.dprompt as dprompt
|
||||||
pkg.openai.session.get_session(session_name).reset(explicit=True, use_prompt=params[0])
|
pkg.openai.session.get_session(session_name).reset(explicit=True, use_prompt=params[0])
|
||||||
reply = ["[bot]会话已重置,使用场景预设:{}".format(dprompt.mode_inst().get_full_name(params[0]))]
|
reply = [tips_custom.command_reset_name_message+"{}".format(dprompt.mode_inst().get_full_name(params[0]))]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
reply = ["[bot]会话重置失败:{}".format(e)]
|
reply = ["[bot]会话重置失败:{}".format(e)]
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ help_message = """【可自定义】
|
|||||||
请不要用其生成整篇文章或大段代码,因为每次只会向模型提交少部分文字,生成大部分文字会产生偏题、前后矛盾等问题
|
请不要用其生成整篇文章或大段代码,因为每次只会向模型提交少部分文字,生成大部分文字会产生偏题、前后矛盾等问题
|
||||||
每次会话最后一次交互后{}分钟后会自动结束,结束后将开启新会话,如需继续前一次会话请发送 !last 重新开启
|
每次会话最后一次交互后{}分钟后会自动结束,结束后将开启新会话,如需继续前一次会话请发送 !last 重新开启
|
||||||
欢迎到github.com/RockChinQ/QChatGPT 给个star
|
欢迎到github.com/RockChinQ/QChatGPT 给个star
|
||||||
指令帮助信息请查看: https://github.com/RockChinQ/QChatGPT/wiki/%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8#%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%8C%87%E4%BB%A4""".format(config.session_expire_time // 60)
|
指令帮助信息请查看: https://github.com/RockChinQ/QChatGPT/wiki/%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8#%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%8C%87%E4%BB%A4""".format(
|
||||||
|
config.session_expire_time // 60)
|
||||||
|
|
||||||
# ---原config.py结束--
|
# ---原config.py结束--
|
||||||
|
|
||||||
@@ -42,3 +43,8 @@ replys_message = ["群聊请求超时"]
|
|||||||
# line:266,279
|
# line:266,279
|
||||||
command_admin_message = "权限不足: "
|
command_admin_message = "权限不足: "
|
||||||
command_err_message = "指令执行出错:"
|
command_err_message = "指令执行出错:"
|
||||||
|
|
||||||
|
# 会话重置提示
|
||||||
|
# pkg/qqbot/cmds/session/reset.py,line:25,31
|
||||||
|
command_reset_message = ["[bot]会话已重置"]
|
||||||
|
command_reset_name_message = ["[bot]会话已重置,使用场景预设:"]
|
||||||
|
|||||||
Reference in New Issue
Block a user