[mirotalksfu] - add OpenAiApi basePath

هذا الالتزام موجود في:
Miroslav Pejic
2023-07-19 07:49:14 +02:00
الأصل ba849de7d7
التزام 784e379eb7
2 ملفات معدلة مع 2 إضافات و0 حذوفات

عرض الملف

@@ -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);

عرض الملف

@@ -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,