The code used is copied from the API documentation found here: https://platform.openai.com/docs/quickstart?context=node.
Additionally this doesn't work out-of-the box. You need to make sure you create an API key here: https://platform.openai.com/api-keys. And add that to the .env
file. Plus, you have to load your account with $$$ to even perform a query.
yarn test