From 8a73673d6b9e542708b726bc818b0b6a0ab7da20 Mon Sep 17 00:00:00 2001 From: imClumsyPanda Date: Sun, 3 Sep 2023 15:57:44 +0800 Subject: [PATCH] update model_config.py.example --- server/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils.py b/server/utils.py index 6174d87..ec07dc6 100644 --- a/server/utils.py +++ b/server/utils.py @@ -203,7 +203,6 @@ def get_model_worker_config(model_name: str = LLM_MODEL) -> dict: from configs.model_config import llm_model_dict config = FSCHAT_MODEL_WORKERS.get("default", {}).copy() - config["device"] = llm_device(config["device"]) config.update(llm_model_dict.get(model_name, {})) config.update(FSCHAT_MODEL_WORKERS.get(model_name, {})) @@ -216,6 +215,7 @@ def get_model_worker_config(model_name: str = LLM_MODEL) -> dict: except Exception as e: print(f"在线模型 ‘{model_name}’ 的provider没有正确配置") + config["device"] = llm_device(config.get("device") or LLM_DEVICE) return config