diff --git a/packages/gpt.gblib/services/ChatServices.ts b/packages/gpt.gblib/services/ChatServices.ts index 92825670..4a27b772 100644 --- a/packages/gpt.gblib/services/ChatServices.ts +++ b/packages/gpt.gblib/services/ChatServices.ts @@ -33,7 +33,7 @@ 'use strict'; import { GBMinInstance } from 'botlib'; -import OpenAI from "openai"; +//import OpenAI from "openai"; import { ChatGPTAPIBrowser, getOpenAIAuth } from 'chatgpt' import { CollectionUtil } from 'pragmatismo-io-framework'; import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords'; @@ -71,15 +71,15 @@ export class ChatServices { // Calls Model. - const openai = new OpenAI({ - apiKey: key - }); - const chatCompletion = await openai.chat.completions.create({ - model: "gpt-3.5-turbo", - messages: [{ role: "user", content: text }], - functions: functions - }); - return chatCompletion.choices[0].message.content; + // const openai = new OpenAI({ + // apiKey: key + // }); + // const chatCompletion = await openai.chat.completions.create({ + // model: "gpt-3.5-turbo", + // messages: [{ role: "user", content: text }], + // functions: functions + // }); + // return chatCompletion.choices[0].message.content; } @@ -104,14 +104,14 @@ export class ChatServices { if (!key) { throw new Error('Open AI Key not configured in .gbot.'); } - const openai = new OpenAI({ - apiKey: key - }); - const chatCompletion = await openai.chat.completions.create({ - model: "gpt-3.5-turbo", - messages: [{ role: "user", content: text }] + // const openai = new OpenAI({ + // apiKey: key + // }); + // const chatCompletion = await openai.chat.completions.create({ + // model: "gpt-3.5-turbo", + // messages: [{ role: "user", content: text }] - }); - return chatCompletion.choices[0].message.content; + // }); + // return chatCompletion.choices[0].message.content; } }