#How to use the new stuff in Node.js?

1 messages · Page 1 of 1 (latest)

mortal shore
#

So I'm trying to implement Speech (and DALL-E 3) into my Discord bot, but it it keeps saying

Cannot read properties of undefined (reading 'speech') // TTS
Cannot read properties of undefined (reading 'generate') // DALL-E 3

The input got all 3 required parameters. I'm not sure what is wrong in my code here. I just added line 10 now but it got rejected by Eslint for some reason. bugcatMathThink

I have also updated the openai npm package.

mortal shore
#

So I just realized that OpenAI API has changed to a new syntax, from createChatCompletion to chat.completions.create. But the new syntax doesn't work for me at all across all functions. Should I uninstall openai npm package to reinstall?

glad anvil
#

if that doesn't work you can always just send regular http requests to the api, the openai package is just a wrapper to make it easier.

mortal shore