mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 21:06:03 +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
|
||||
|
||||
import pkg.openai.session
|
||||
@@ -22,12 +23,12 @@ class ResetCommand(AbstractCommandNode):
|
||||
|
||||
if len(params) == 0:
|
||||
pkg.openai.session.get_session(session_name).reset(explicit=True)
|
||||
reply = ["[bot]会话已重置"]
|
||||
reply = tips_custom.command_reset_message
|
||||
else:
|
||||
try:
|
||||
import pkg.openai.dprompt as dprompt
|
||||
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:
|
||||
reply = ["[bot]会话重置失败:{}".format(e)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user