diff --git a/src/pages/api/lib/chatgpt.ts b/src/pages/api/lib/chatgpt.ts index 5043fe8..acf118b 100644 --- a/src/pages/api/lib/chatgpt.ts +++ b/src/pages/api/lib/chatgpt.ts @@ -33,22 +33,22 @@ export class ChatGPT { try { const headers = { "Content-Type": "application/json", - Authorization: `Bearer ${this.key}`, + "Authorization": `Bearer ${this.key}`, }; const data = JSON.stringify({ model: this.model, messages: [ { - role: "system", - content: `You are a professional, authentic translation engine, only returns translations.`, + "role": "system", + "content": `You are a professional, authentic translation engine, only returns translations.`, }, { - role: "user", - content: `Please translate the text from ${source} to ${target} language, without explaining my original text.`, + "role": "user", + "content": `Please translate the text from ${source} to ${target} language, without explaining my original text, the text I will send you in the next sentence.`, }, { - role: "user", - content: text, + "role": "user", + "content": text, }, ], temperature: 0.7, diff --git a/src/pages/api/lib/gemini.ts b/src/pages/api/lib/gemini.ts index ae98853..88e798f 100644 --- a/src/pages/api/lib/gemini.ts +++ b/src/pages/api/lib/gemini.ts @@ -37,13 +37,13 @@ export class Gemini { { parts: [ { - text: `You are a professional, authentic translation engine, only returns translations.`, + "text": `You are a professional, authentic translation engine, only returns translations.`, }, { - text: `Please translate the text from ${source} to ${target} language, without explaining my original text.`, + "text": `Please translate the text from ${source} to ${target} language, without explaining my original text, the text I will send you in the next sentence.`, }, { - text: text, + "text": text, }, ], }, diff --git a/src/pages/api/lib/qwen.ts b/src/pages/api/lib/qwen.ts index b08ab7b..178c3cf 100644 --- a/src/pages/api/lib/qwen.ts +++ b/src/pages/api/lib/qwen.ts @@ -34,23 +34,23 @@ export class Qwen { try { const headers = { "Content-Type": "application/json", - Authorization: `Bearer ${this.key}`, + "Authorization": `Bearer ${this.key}`, }; const data = JSON.stringify({ model: this.model, input: { messages: [ { - role: "system", - content: `You are a professional, authentic translation engine, only returns translations.`, + "role": "system", + "content": `You are a professional, authentic translation engine, only returns translations.`, }, { - role: "user", - content: `Please translate the text from ${source} to ${target} language, without explaining my original text.`, + "role": "user", + "content": `Please translate the text from ${source} to ${target} language, without explaining my original text, the text I will send you in the next sentence.`, }, { - role: "user", - content: text, + "role": "user", + "content": text, }, ], },