javascript-course icon indicating copy to clipboard operation
javascript-course copied to clipboard

Migrated code in server.js to work with OpenAI API v4

Open ramia15 opened this issue 2 years ago • 1 comments

Updated the code to work with OpenAI API v4 and added improved error handling. This is my first time contributing on github since college. :)

ramia15 avatar Sep 02 '23 16:09 ramia15

Hi @ramia15 your solution is like this

const configuration = { apiKey: process.env.OPENIA_KEY, }; const openai = new OpenAI(configuration);

all changes from new realase in openAI right?

sebastian031093 avatar Jan 21 '24 19:01 sebastian031093