#Chatgpt Ai app javascript mastery

9 messages · Page 1 of 1 (latest)

north stratus
#

Hello everbody, this is my first post i hope i am not breaking any rules.

My question is about Javascript Mastery channel where we are building chatgpt like web app.

So I am getting this error when I try to launch my app in localhost. I think the problem is with the openAi API key because it is different from the one in the video, also different parameters, etc. So my question is, is the video from the youtube still viable to make the app, or should I learn from watching other videos on the channel? Thanks in advance, Miki.

boreal fog
#

This error comes from using OpenAI version 3 code but importing version 4. The easy option is to modify the package.json to specify version 3.1.0, which is what was used in the JSM video. The more difficult option is to follow the migration guide. https://github.com/openai/openai-node/discussions/217
Following that guide will allow you to use the newer version, but it requires rewriting some code in a way that is different from what is in the video.

GitHub

v4 is a complete rewrite of the SDK. To see what's new, see the release notes. Installation First, update your package.json to specify v4: "openai": "^4.0.0" and run npm ins...

north stratus
#

Thanks for the such fast response! I will try it tomorrow, hope this resolve the problem I have!

north stratus
boreal fog
north stratus
boreal fog
north stratus