浏览代码

fix(Add model api): Add VolcEngine to create api_key format error (#2490)

### What problem does this PR solve?


Add VolcEngine to create api_key format error
When constructing the json string, there was an extra "," at the end,
which caused a formatting error. This commit fixed the problem.


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.12.0
_Chenbing 1年前
父节点
当前提交
af0b4b0828
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      api/apps/llm_app.py

+ 1
- 1
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", "")}"' + '}'

正在加载...
取消
保存