暂时移除插件锁定

This commit is contained in:
binary-husky
2023-06-01 09:39:00 +08:00
parent 2b620ccf2e
commit 2f037f30d5
2 changed files with 94 additions and 76 deletions

View File

@ -59,15 +59,7 @@ def ArgsGeneralWrapper(f):
}
chatbot_with_cookie = ChatBotWithCookies(cookies)
chatbot_with_cookie.write_list(chatbot)
if 'lock_plugin' in cookies and cookies['lock_plugin'] is not None:
# 处理插件锁定状态
module, fn_name = cookies['lock_plugin'].split('->')
f_hot_reload = getattr(importlib.import_module(module, fn_name), fn_name)
yield from HotReload(f_hot_reload)(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
else:
# 正常状态
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
return decorated