mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-11-03 03:09:49 +00:00
BugFix: Fixed api_key generation error for VolcEngine (#2502)
BugFix: Fixed api_key generation error for VolcEngine with python's f-string syntax ### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: 海贼宅 <stu_xyx@163.com>
This commit is contained in:
parent
ddb8be9219
commit
4f962d6bff
@ -130,8 +130,7 @@ def add_llm():
|
||||
# For VolcEngine, due to its special authentication method
|
||||
# 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", "")}" ' + '}'
|
||||
api_key = f'{{ "ark_api_key":"{req.get("ark_api_key", "")}", "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", "")}"' + '}'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user