From 784e379eb7875eed41a36c0a8064224e2dfad4d7 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Wed, 19 Jul 2023 07:49:14 +0200 Subject: [PATCH] [mirotalksfu] - add OpenAiApi basePath --- app/src/Server.js | 1 + app/src/config.template.js | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/Server.js b/app/src/Server.js index 938337eb..512775e3 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -130,6 +130,7 @@ if (config.chatGPT.enabled) { if (config.chatGPT.apiKey) { const { Configuration, OpenAIApi } = require('openai'); const configuration = new Configuration({ + basePath: config.chatGPT.basePath, apiKey: config.chatGPT.apiKey, }); chatGPT = new OpenAIApi(configuration); diff --git a/app/src/config.template.js b/app/src/config.template.js index a2a183ef..e181a8de 100644 --- a/app/src/config.template.js +++ b/app/src/config.template.js @@ -91,6 +91,7 @@ module.exports = { 3. Generate your APIKey https://platform.openai.com/account/api-keys */ enabled: false, + basePath: 'https://api.openai.com/v1/', apiKey: '', model: 'text-davinci-003', max_tokens: 1000,