diff --git a/README.md b/README.md index d8b4756..7703208 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ git clone --depth=1 https://github.com/OpenLMLab/MOSS.git request_llms/moss # 参考wiki:https://github.com/binary-husky/gpt_academic/wiki/%E9%80%82%E9%85%8DRWKV-Runner # 【可选步骤IV】确保config.py配置文件的AVAIL_LLM_MODELS包含了期望的模型,目前支持的全部模型如下(jittorllms系列目前仅支持docker方案): -AVAIL_LLM_MODELS = ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "chatglm", "newbing", "moss"] # + ["jittorllms_rwkv", "jittorllms_pangualpha", "jittorllms_llama"] +AVAIL_LLM_MODELS = ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "chatglm", "moss"] # + ["jittorllms_rwkv", "jittorllms_pangualpha", "jittorllms_llama"] ```

diff --git a/crazy_functions/多智能体.py b/crazy_functions/多智能体.py index 99b3e86..3fab4c3 100644 --- a/crazy_functions/多智能体.py +++ b/crazy_functions/多智能体.py @@ -19,6 +19,11 @@ from crazy_functions.agent_fns.persistent import GradioMultiuserManagerForPersis from crazy_functions.agent_fns.auto_agent import AutoGenMath import time +def remove_model_prefix(llm): + if llm.startswith('api2d-'): llm = llm.replace('api2d-', '') + if llm.startswith('azure-'): llm = llm.replace('azure-', '') + return llm + @CatchException def 多智能体终端(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, web_port): @@ -32,10 +37,16 @@ def 多智能体终端(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_ web_port 当前软件运行的端口号 """ # 检查当前的模型是否符合要求 - supported_llms = ['gpt-3.5-turbo-16k', 'gpt-4', 'gpt-4-32k', - 'api2d-gpt-3.5-turbo-16k', 'api2d-gpt-4'] + supported_llms = [ + 'gpt-3.5-16k', + 'gpt-3.5-turbo-16k', + 'gpt-3.5-turbo-1106', + 'gpt-4', + 'gpt-4-32k', + 'gpt-4-1106-preview', + ] llm_kwargs['api_key'] = select_api_key(llm_kwargs['api_key'], llm_kwargs['llm_model']) - if llm_kwargs['llm_model'] not in supported_llms: + if remove_model_prefix(llm_kwargs['llm_model']) not in supported_llms: chatbot.append([f"处理任务: {txt}", f"当前插件只支持{str(supported_llms)}, 当前模型{llm_kwargs['llm_model']}."]) yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 return diff --git a/request_llms/bridge_chatgpt.py b/request_llms/bridge_chatgpt.py index 9903da9..292de0a 100644 --- a/request_llms/bridge_chatgpt.py +++ b/request_llms/bridge_chatgpt.py @@ -351,6 +351,7 @@ def generate_payload(inputs, llm_kwargs, history, system_prompt, stream): model = random.choice([ "gpt-3.5-turbo", "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-16k-0613", "gpt-3.5-turbo-0301",