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

Reactjs – OpenAI Configuration

import { Configuration, OpenAIApi} from 'openai'; ^^^^^^^^^^^^^ SyntaxError: The requested module 'openai' does not provide an export named 'Configuration' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) I am getting this error in Node.js v18.14.2 This is my index.js code: import…

VIEW QUESTION

Reactjs – The requested module 'openai' does not provide an export named 'Configuration' error

I'm trying to build an AI image generating website using MERN and I got this error: The requested module 'openai' does not provide an export named 'Configuration'. file:///C:/Users/Rashmika%20Satish/ai_website/server/routes/dalleRoutes.js:3 import {Configuration, OpenAIApi} from 'openai'; ^^^^^^^^^^^^^ SyntaxError: The requested module 'openai' does…

VIEW QUESTION
Back To Top
Search