chore: switch from @waylaidwanderer/chatgpt-api to nodejs-gpt for latest fixes (#1050)

This commit is contained in:
Danny Avila 2023-10-14 13:06:50 -04:00 committed by GitHub
parent e7e473d335
commit 241bc68d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 113 additions and 121 deletions

View file

@ -29,7 +29,7 @@ const askBing = async ({
key = await getUserKey({ userId, name: 'bingAI' });
}
const { BingAIClient } = await import('@waylaidwanderer/chatgpt-api');
const { BingAIClient } = await import('nodejs-gpt');
const store = {
store: new KeyvFile({ filename: './data/cache.json' }),
};

View file

@ -24,7 +24,7 @@ const browserClient = async ({
key = await getUserKey({ userId, name: 'chatGPTBrowser' });
}
const { ChatGPTBrowserClient } = await import('@waylaidwanderer/chatgpt-api');
const { ChatGPTBrowserClient } = await import('nodejs-gpt');
const store = {
store: new KeyvFile({ filename: './data/cache.json' }),
};

View file

@ -8,7 +8,7 @@ const titleConvo = async ({ text, response }) => {
return title;
}
const { BingAIClient } = await import('@waylaidwanderer/chatgpt-api');
const { BingAIClient } = await import('nodejs-gpt');
const titleGenerator = new BingAIClient({
userToken: process.env.BINGAI_TOKEN,
debug: false,

View file

@ -25,7 +25,6 @@
"@azure/search-documents": "^11.3.2",
"@keyv/mongo": "^2.1.8",
"@keyv/redis": "^2.8.0",
"@waylaidwanderer/chatgpt-api": "^1.37.2",
"axios": "^1.3.4",
"bcryptjs": "^2.4.3",
"cheerio": "^1.0.0-rc.12",
@ -51,6 +50,7 @@
"lodash": "^4.17.21",
"meilisearch": "^0.33.0",
"mongoose": "^7.1.1",
"nodejs-gpt": "^1.37.4",
"nodemailer": "^6.9.4",
"openai": "^4.11.1",
"openai-chat-tokens": "^0.2.8",