From ef816d91e04825decee0616ab97b2fd2b9d6da64 Mon Sep 17 00:00:00 2001 From: Chenbing Date: Thu, 19 Sep 2024 14:52:59 +0800 Subject: [PATCH] fix(Add model api): Add VolcEngine to create api_key format error --- api/apps/llm_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index 544024992dc..69bf7f220d7 100644 --- a/api/apps/llm_app.py +++ b/api/apps/llm_app.py @@ -128,7 +128,7 @@ def add_llm(): # Assemble ark_api_key endpoint_id into api_key llm_name = req["llm_name"] api_key = '{' + f'"ark_api_key": "{req.get("ark_api_key", "")}", ' \ - f'"ep_id": "{req.get("endpoint_id", "")}", ' + '}' + f'"ep_id": "{req.get("endpoint_id", "")}" ' + '}' elif factory == "Tencent Hunyuan": api_key = '{' + f'"hunyuan_sid": "{req.get("hunyuan_sid", "")}", ' \ f'"hunyuan_sk": "{req.get("hunyuan_sk", "")}"' + '}'