feat: support volcengine api

This commit is contained in:
Gabe
2025-06-30 21:34:37 +08:00
parent 5f0ce57ead
commit 24d904b32c
5 changed files with 43 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import {
OPT_TRANS_NIUTRANS,
OPT_TRANS_BAIDU,
OPT_TRANS_TENCENT,
OPT_TRANS_VOLCENGINE,
OPT_TRANS_OPENAI,
OPT_TRANS_OPENAI_2,
OPT_TRANS_OPENAI_3,
@@ -305,6 +306,10 @@ export const apiTranslate = async ({
trText = res?.auto_translation?.[0];
isSame = text === trText;
break;
case OPT_TRANS_VOLCENGINE:
trText = res?.translation || "";
isSame = to === res?.detected_language;
break;
case OPT_TRANS_OPENAI:
case OPT_TRANS_OPENAI_2:
case OPT_TRANS_OPENAI_3: