fix: revert old google translate api

This commit is contained in:
Gabe
2025-06-26 11:13:51 +08:00
parent a6cb5544f8
commit eaa47af269
3 changed files with 26 additions and 23 deletions

View File

@@ -87,7 +87,8 @@ export const URL_MICROSOFT_AUTH = "https://edge.microsoft.com/translate/auth";
export const URL_MICROSOFT_LANGDETECT =
"https://api-edge.cognitive.microsofttranslator.com/detect?api-version=3.0";
export const URL_GOOGLE_TRAN = "https://translate-pa.googleapis.com/v1/translateHtml";
export const URL_GOOGLE_TRAN =
"https://translate.googleapis.com/translate_a/single";
export const DEFAULT_GOOGLE_API_KEY = "AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520";
@@ -551,7 +552,8 @@ const defaultOllamaApi = {
export const DEFAULT_TRANS_APIS = {
[OPT_TRANS_GOOGLE]: {
url: URL_GOOGLE_TRAN,
key: DEFAULT_GOOGLE_API_KEY,
key: "",
// key: DEFAULT_GOOGLE_API_KEY,
fetchLimit: DEFAULT_FETCH_LIMIT, // 最大任务数量
fetchInterval: DEFAULT_FETCH_INTERVAL, // 任务间隔时间
},