Feat: Add Azure support (#219)

feat(api): add support for Azure OpenAI API

- Add Azure OpenAI API environment variables to .env.example
- Modify chatgpt-client.js to use Azure OpenAI API if environment variables are present
- Modify askOpenAI.js to use arrow function syntax
- Modify handlers.js to add console.log statement for partial variable
This commit is contained in:
Danny Avila 2023-05-09 17:42:55 -04:00 committed by GitHub
parent e2dc994b63
commit 5dd9c11326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 144 additions and 25 deletions

View file

@ -11,7 +11,7 @@ const browserClient = async ({
abortController,
userId
}) => {
const { ChatGPTBrowserClient } = await import('@waylaidwanderer/chatgpt-api');
const { ChatGPTBrowserClient } = await import('og-chatgpt-api');
const store = {
store: new KeyvFile({ filename: './data/cache.json' })
};