Rename apiCustomParams to customBody

This commit is contained in:
FlyLoongZ
2025-08-11 16:03:30 +08:00
parent be6e34ba52
commit e1f902c203
4 changed files with 26 additions and 26 deletions

View File

@@ -228,11 +228,11 @@ export const I18N = {
zh: `请求超时时间 (5000-30000ms)`,
en: `Request Timeout Time (5000-30000ms)`,
},
api_custom_params: {
zh: `API自定义参数`,
custom_body: {
zh: `自定义Body参数`,
en: `API Custom Params`,
},
api_custom_params_help: {
custom_body_help: {
zh: `使用JSON格式例如 "top_p": 0.7`,
en: `Use JSON format, for example "top_p": 0.7`,
},

View File

@@ -563,7 +563,7 @@ const defaultOpenaiApi = {
model: "gpt-4",
systemPrompt: `You are a professional, authentic machine translation engine.`,
userPrompt: `Translate the following source text from ${INPUT_PLACE_FROM} to ${INPUT_PLACE_TO}. Output translation directly without any additional text.\n\nSource Text: ${INPUT_PLACE_TEXT}\n\nTranslated Text:`,
apiCustomParams: "",
customBody: "",
temperature: 0,
maxTokens: 256,
fetchLimit: 1,
@@ -578,7 +578,7 @@ const defaultOllamaApi = {
model: "llama3.1",
systemPrompt: `You are a professional, authentic machine translation engine.`,
userPrompt: `Translate the following source text from ${INPUT_PLACE_FROM} to ${INPUT_PLACE_TO}. Output translation directly without any additional text.\n\nSource Text: ${INPUT_PLACE_TEXT}\n\nTranslated Text:`,
apiCustomParams: "",
customBody: "",
think: false,
thinkIgnore: `qwen3,deepseek-r1`,
fetchLimit: 1,
@@ -679,7 +679,7 @@ export const DEFAULT_TRANS_APIS = {
model: "gemini-2.5-flash",
systemPrompt: `You are a professional, authentic machine translation engine.`,
userPrompt: `Translate the following source text from ${INPUT_PLACE_FROM} to ${INPUT_PLACE_TO}. Output translation directly without any additional text.\n\nSource Text: ${INPUT_PLACE_TEXT}\n\nTranslated Text:`,
apiCustomParams: "",
customBody: "",
temperature: 0,
maxTokens: 2048,
fetchLimit: 1,
@@ -694,7 +694,7 @@ export const DEFAULT_TRANS_APIS = {
model: "gemini-2.0-flash",
systemPrompt: `You are a professional, authentic machine translation engine.`,
userPrompt: `Translate the following source text from ${INPUT_PLACE_FROM} to ${INPUT_PLACE_TO}. Output translation directly without any additional text.\n\nSource Text: ${INPUT_PLACE_TEXT}\n\nTranslated Text:`,
apiCustomParams: "",
customBody: "",
temperature: 0,
maxTokens: 2048,
fetchLimit: 1,
@@ -709,7 +709,7 @@ export const DEFAULT_TRANS_APIS = {
model: "claude-3-haiku-20240307",
systemPrompt: `You are a professional, authentic machine translation engine.`,
userPrompt: `Translate the following source text from ${INPUT_PLACE_FROM} to ${INPUT_PLACE_TO}. Output translation directly without any additional text.\n\nSource Text: ${INPUT_PLACE_TEXT}\n\nTranslated Text:`,
apiCustomParams: "",
customBody: "",
temperature: 0,
maxTokens: 1024,
fetchLimit: 1,