plugins: support openaibot

This commit is contained in:
lanvent
2023-03-26 23:33:29 +08:00
parent ea95ab9062
commit ff3d143185
5 changed files with 15 additions and 10 deletions

View File

@@ -179,7 +179,7 @@ class Godcmd(Plugin):
elif cmd == "id":
ok, result = True, f"用户id=\n{user}"
elif cmd == "reset":
if bottype == const.CHATGPT:
if bottype in (const.CHATGPT, const.OPEN_AI):
bot.sessions.clear_session(session_id)
ok, result = True, "会话已重置"
else:
@@ -201,7 +201,7 @@ class Godcmd(Plugin):
load_config()
ok, result = True, "配置已重载"
elif cmd == "resetall":
if bottype == const.CHATGPT:
if bottype in (const.CHATGPT, const.OPEN_AI):
bot.sessions.clear_all_session()
ok, result = True, "重置所有会话成功"
else: