将高级参数输入通用化(默认隐藏),应用到所有的下拉菜单函数插件中

这个提交包含在:
Your Name
2023-04-22 15:06:54 +08:00
父节点 3236fcca21
当前提交 1139d395f2
共有 4 个文件被更改,包括 23 次插入26 次删除

查看文件

@@ -24,7 +24,7 @@ def ArgsGeneralWrapper(f):
"""
装饰器函数,用于重组输入参数,改变输入参数的顺序与结构。
"""
def decorated(cookies, max_length, llm_model, txt, txt2, top_p, temperature, chatbot, history, system_prompt, txt_pattern, *args):
def decorated(cookies, max_length, llm_model, txt, txt2, top_p, temperature, chatbot, history, system_prompt, plugin_advanced_arg, *args):
txt_passon = txt
if txt == "" and txt2 != "": txt_passon = txt2
# 引入一个有cookie的chatbot
@@ -39,10 +39,9 @@ def ArgsGeneralWrapper(f):
'max_length': max_length,
'temperature':temperature,
}
# plugin_kwargs = {
# # 目前还没有
# }
plugin_kwargs = dict(txt_pattern = txt_pattern)
plugin_kwargs = {
"advanced_arg": plugin_advanced_arg,
}
chatbot_with_cookie = ChatBotWithCookies(cookies)
chatbot_with_cookie.write_list(chatbot)
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)