skip to Main Content

Javascript – User Input for ChatGPT/OpenAIApi not working TypeError: Cannot read properties of undefined (reading 'choices')

I looked into various possible solutions: OpenAI and Javascript error : Getting 'TypeError: Cannot read properties of undefined (reading 'create') at Object.<anonymous>" https://github.com/davila7/code-gpt-docs/issues/57 https://www.npmjs.com/package/openai Here is my code: import { config } from "dotenv" config() // New import OpenAI from…

VIEW QUESTION
Back To Top
Search