fix: llm_model_dict with `xxx/xxx` local_model_path was parsed as online-api (#1513)

This commit is contained in:
liunux4odoo 2023-09-18 12:10:03 +08:00 committed by GitHub
parent 1ec63de968
commit 46af5b7571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -211,8 +211,8 @@ def get_model_worker_config(model_name: str = LLM_MODEL) -> dict:
config.update(llm_model_dict.get(model_name, {})) config.update(llm_model_dict.get(model_name, {}))
config.update(FSCHAT_MODEL_WORKERS.get(model_name, {})) config.update(FSCHAT_MODEL_WORKERS.get(model_name, {}))
# 如果没有设置有效的local_model_path则认为是在线模型API # 如果没有设置local_model_path则认为是在线模型API
if not os.path.isdir(config.get("local_model_path", "")): if not config.get("local_model_path"):
config["online_api"] = True config["online_api"] = True
if provider := config.get("provider"): if provider := config.get("provider"):
try: try: