Code Monkey home page Code Monkey logo

Comments (21)

SETHEAD avatar SETHEAD commented on June 2, 2024 3

typeerror2
typeerror1

from project_ai_mern_image_generation.

shukabum avatar shukabum commented on June 2, 2024

@vatsal1812 share the screen shot of the code

from project_ai_mern_image_generation.

abhiram-edupuganti avatar abhiram-edupuganti commented on June 2, 2024

@vatsal1812 share your
code screenshot

from project_ai_mern_image_generation.

SETHEAD avatar SETHEAD commented on June 2, 2024

@vatsal1812 share your code screenshot

please let me know what to do with the error. I've attached the screenshot of the error in another reply.

If you want the screenshot of the code, please let me know of which page or code file name you want the screenshot.

from project_ai_mern_image_generation.

ajinkyap12 avatar ajinkyap12 commented on June 2, 2024

Same problem with me also

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

exactly same error, please let me know if you have found the error

from project_ai_mern_image_generation.

Quinn-Kiwalabye avatar Quinn-Kiwalabye commented on June 2, 2024

exactly same error, please let me know if you have found the error
i fixed this error by downgrading the openai to match adrian's version on package.json

from project_ai_mern_image_generation.

ajinkyap12 avatar ajinkyap12 commented on June 2, 2024

Can u tell me what u have change or can u give us screenshot

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

exactly same error, please let me know if you have found the error
i fixed this error by downgrading the openai to match adrian's version on package.json

I changed "openai": "^3.1.0" to this from version 4, but still I am getting the same error, I am stuck in this from weeks ,It would be a great help if you guide me to solve this issue
my email : [email protected]

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

Can u tell me what u have change or can u give us screenshot

yes please, share some code files or Screenshots

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

@vatsal1812 share your code screenshot

please let me know what to do with the error. I've attached the screenshot of the error in another reply.

If you want the screenshot of the code, please let me know of which page or code file name you want the screenshot.

typeerror2 typeerror1

Have you solved this error ? if yes please share the solution, I am trying to debug it from weeks

from project_ai_mern_image_generation.

Quinn-Kiwalabye avatar Quinn-Kiwalabye commented on June 2, 2024

Can u tell me what u have change or can u give us screenshot

step 1: go to the package.json file
step 2: downgrade your open ai(make sure your package.json file matches adrian's file)`{
"name": "server",
"version": "1.0.0",
"type": "module",
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon index"
},
"author": "",
"license": "ISC",
"dependencies": {
"cloudinary": "^1.33.0",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"mongoose": "^6.8.2",
"nodemon": "^2.0.20",
"openai": "^3.1.0"
}

}`
step 3: stop your node server, by pressing ctrl c (windows)
step 4: type "npm install", it will update the package json
step 5: run the node server
step 6: make sure that you have inported configuration, openAi from 'openai'
dalle

from project_ai_mern_image_generation.

Quinn-Kiwalabye avatar Quinn-Kiwalabye commented on June 2, 2024

exactly same error, please let me know if you have found the error
i fixed this error by downgrading the openai to match adrian's version on package.json

I changed "openai": "^3.1.0" to this from version 4, but still I am getting the same error, I am stuck in this from weeks ,It would be a great help if you guide me to solve this issue my email : [email protected]

can you send me a screen shot of what your inspection page is saying

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

exactly same error, please let me know if you have found the error
i fixed this error by downgrading the openai to match adrian's version on package.json

I changed "openai": "^3.1.0" to this from version 4, but still I am getting the same error, I am stuck in this from weeks ,It would be a great help if you guide me to solve this issue my email : [email protected]

can you send me a screen shot of what your inspection page is saying

I have made all the changes you suggested, now instead of typerror : failed to fetch I am getting this error :

image

from project_ai_mern_image_generation.

Quinn-Kiwalabye avatar Quinn-Kiwalabye commented on June 2, 2024

pl

exactly same error, please let me know if you have found the error
i fixed this error by downgrading the openai to match adrian's version on package.json

I changed "openai": "^3.1.0" to this from version 4, but still I am getting the same error, I am stuck in this from weeks ,It would be a great help if you guide me to solve this issue my email : [email protected]

can you send me a screen shot of what your inspection page is saying

I have made all the changes you suggested, now instead of typerror : failed to fetch I am getting this error :

image

please send your dalleRoutes code

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

pl

exactly same error, please let me know if you have found the error
i fixed this error by downgrading the openai to match adrian's version on package.json

I changed "openai": "^3.1.0" to this from version 4, but still I am getting the same error, I am stuck in this from weeks ,It would be a great help if you guide me to solve this issue my email : [email protected]

can you send me a screen shot of what your inspection page is saying

I have made all the changes you suggested, now instead of typerror : failed to fetch I am getting this error :
image

please send your dalleRoutes code

import express from 'express';
import * as dotenv from 'dotenv';
import {Configuration, OpenAIApi} from 'openai';

dotenv.config();

const router = express.Router();

const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);

router.route('/').get( (req, res) => {
res.status(200).json({ message : 'Hello its DALL-E here'});
});

router.route('/').post(async (req, res) => {
try {
const { prompt } = req.body;

    const aiResponse = await openai.createImage({
        prompt, 
        n: 1,
        size: '1024x1024',
        response_format: 'b64_json'
    });

    const image = aiResponse.data.data[0].b64_json;

    res.status(200).json( { photo : image });

} catch (error) {
    console.error(error); 
    res.status(500).send(error?.response.data.error.message );

}

} );

export default router;

from project_ai_mern_image_generation.

Raghu994 avatar Raghu994 commented on June 2, 2024

any update on this?

from project_ai_mern_image_generation.

gaurav3590 avatar gaurav3590 commented on June 2, 2024

Same problem with me also,This solution can't work.

from project_ai_mern_image_generation.

gaurav3590 avatar gaurav3590 commented on June 2, 2024

Screenshot 2023-12-01 103821
and also this error i can't solve plz some help me

from project_ai_mern_image_generation.

harshjain22 avatar harshjain22 commented on June 2, 2024

can you share what errors are there in the inspect tab ?

from project_ai_mern_image_generation.

gaurav3590 avatar gaurav3590 commented on June 2, 2024

257549787-53abb81f-e8d7-40e3-90a9-4f9d5356dfd8

from project_ai_mern_image_generation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.