-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to integrate this project with a frontend, #358
Comments
Hmmm, I'm not sure the exact issue you're running into, but I'm looking to replace that dependency. This may be helpful for you: async function example() {
// To use ESM in CommonJS, you can use a dynamic import
const { ChatGPTAPI } = await import(https://github.com/transitive-bullshit/chatgpt-api)
const api = new ChatGPTAPI({ apiKey: process.env.OPENAI_API_KEY })
const res = await api.sendMessage('Hello World!')
console.log(res.text)
} #336 and #334 look related as they all have to do with compat issues with |
Hey there, Any chance you can whitelist localhost? Thanks!! |
Try the new version https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v4.6.0 It replaces the troublesome gpt-3-encoder with a better dependency.
Any CORS issues are happening in your webapp and have nothing to do with this project. |
Describe the feature
I'm trying to integrate this project with a frontend, but I'm encountering version conflicts when using Umi. I attempted to integrate it with nodejs+koa2, but that also failed. I'm hoping to run this project as a standalone service to provide an API for the frontend, which will help avoid version conflicts. If you can help me get this project up and running as a standalone service, it would be very helpful. Thank you.
The text was updated successfully, but these errors were encountered: