feat: Add AI API Custom Params
This commit is contained in:
@@ -563,6 +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: "",
|
||||
temperature: 0,
|
||||
maxTokens: 256,
|
||||
fetchLimit: 1,
|
||||
@@ -577,6 +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: "",
|
||||
think: false,
|
||||
thinkIgnore: `qwen3,deepseek-r1`,
|
||||
fetchLimit: 1,
|
||||
@@ -677,6 +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: "",
|
||||
temperature: 0,
|
||||
maxTokens: 2048,
|
||||
fetchLimit: 1,
|
||||
@@ -691,6 +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: "",
|
||||
temperature: 0,
|
||||
maxTokens: 2048,
|
||||
fetchLimit: 1,
|
||||
@@ -705,6 +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: "",
|
||||
temperature: 0,
|
||||
maxTokens: 1024,
|
||||
fetchLimit: 1,
|
||||
|
||||
Reference in New Issue
Block a user