From 69f37df356889f22c8fdfebdb580cf9815a6a79d Mon Sep 17 00:00:00 2001 From: binary-husky Date: Sun, 12 Nov 2023 22:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5=E4=BF=AE=E5=A4=8D=E7=BB=88?= =?UTF-8?q?=E7=BB=93=E7=82=B9=E8=A6=86=E7=9B=96=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- request_llms/bridge_all.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/request_llms/bridge_all.py b/request_llms/bridge_all.py index 7d13bbd..89c9f76 100644 --- a/request_llms/bridge_all.py +++ b/request_llms/bridge_all.py @@ -8,7 +8,7 @@ 具备多线程调用能力的函数:在函数插件中被调用,灵活而简洁 2. predict_no_ui_long_connection(...) """ -import tiktoken +import tiktoken, copy from functools import lru_cache from concurrent.futures import ThreadPoolExecutor from toolbox import get_conf, trimmed_format_exc @@ -238,14 +238,14 @@ model_info = { # -=-=-=-=-=-=- api2d 对齐支持 -=-=-=-=-=-=- for model in AVAIL_LLM_MODELS: if model.startswith('api2d-') and (model.replace('api2d-','') in model_info.keys()): - mi = model_info[model.replace('api2d-','')] + mi = copy.deepcopy(model_info[model.replace('api2d-','')]) mi.update({"endpoint": api2d_endpoint}) model_info.update({model: mi}) # -=-=-=-=-=-=- azure 对齐支持 -=-=-=-=-=-=- for model in AVAIL_LLM_MODELS: if model.startswith('azure-') and (model.replace('azure-','') in model_info.keys()): - mi = model_info[model.replace('azure-','')] + mi = copy.deepcopy(model_info[model.replace('azure-','')]) mi.update({"endpoint": azure_endpoint}) model_info.update({model: mi})