mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore(cli): update translate CLI configs
This commit is contained in:
parent
ceeeeb07a3
commit
39cacf45ff
1 changed files with 3 additions and 2 deletions
|
@ -14,7 +14,7 @@ export const createOpenaiApi = () => {
|
||||||
const proxy = getProxy();
|
const proxy = getProxy();
|
||||||
|
|
||||||
return got.extend({
|
return got.extend({
|
||||||
prefixUrl: 'https://api.openai.com/v1',
|
prefixUrl: process.env.OPENAI_API_PROXY_ENDPOINT ?? 'https://api.openai.com/v1',
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? ''}`,
|
Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? ''}`,
|
||||||
},
|
},
|
||||||
|
@ -50,7 +50,8 @@ export const translate = async ({
|
||||||
api
|
api
|
||||||
.post('chat/completions', {
|
.post('chat/completions', {
|
||||||
json: {
|
json: {
|
||||||
model: 'gpt-3.5-turbo-1106',
|
// The full list of OPENAI model can be found at https://platform.openai.com/docs/models.
|
||||||
|
model: process.env.OPENAI_MODEL_NAME ?? 'gpt-3.5-turbo-0125',
|
||||||
messages: getTranslationPromptMessages({
|
messages: getTranslationPromptMessages({
|
||||||
sourceFileContent,
|
sourceFileContent,
|
||||||
targetLanguage,
|
targetLanguage,
|
||||||
|
|
Loading…
Reference in a new issue