Coder Social home page Coder Social logo

Comments (7)

Adylitto avatar Adylitto commented on June 18, 2024

still same error after using new api
npm run server

[email protected] server
nodemon server

[nodemon] 2.0.20
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node server.js
node:events:505
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE: address already in use :::5000
at Server.setupListenHandle [as _listen2] (node:net:1372:16)
at listenInCluster (node:net:1420:12)
at Server.listen (node:net:1508:7)
at Function.listen (/Users/adylitto/CODE/openai/server/node_modules/express/lib/application.js:635:24)
at file:///Users/adylitto/CODE/openai/server/server.js:48:5
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:61:12)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1399:8)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'EADDRINUSE',
errno: -48,
syscall: 'listen',
address: '::',
port: 5000
}
[nodemon] app crashed - waiting for file changes before starting...

from project_openai_codex.

Adylitto avatar Adylitto commented on June 18, 2024

Based on the provided log, the error 429 is coming from the OpenAI API. The response object contains an HTTP status code of 429, which is indicative of Too Many Requests. This means that the client (your code) has exceeded the rate limit for the API. The response data also contains an error object, which may provide additional information about the error.

In this case, it appears that the error is being thrown by Axios, which is the HTTP client library being used to make the API request. The log also indicates that the isAxiosError flag is set to true, which means that the error was generated by Axios rather than the server.

To resolve the error, you will need to implement rate limiting or modify the code to reduce the number of API requests being made. You can also check the OpenAI API documentation to see if they provide any guidance on how to avoid this error.

from project_openai_codex.

tomoat avatar tomoat commented on June 18, 2024

The error log has told you the cause of the error Error: listen EADDRINUSE: address already in use :::5000

from project_openai_codex.

willgoncdev avatar willgoncdev commented on June 18, 2024

@Adylitto this is because the key that was in his code is already expired or out of credits, the best way to fix it is to get your own key and follow the steps to deploy the server, and then update the http on the script.js with the link of the new server. hope it helped.

from project_openai_codex.

Divyansh-singh08 avatar Divyansh-singh08 commented on June 18, 2024

{"message":"Request failed with status code 429","name":"Error","stack":"Error: Request failed with status code 429\n at createError (/opt/render/project/src/server/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/opt/render/project/src/server/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/opt/render/project/src/server/node_modules/axios/lib/adapters/http.js:322:11)\n at IncomingMessage.emit (events.js:388:22)\n at endReadableNT (internal/streams/readable.js:1336:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json","User-Agent":"OpenAI/NodeJS/3.1.0","Authorization":"Bearer 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","Content-Length":133},"method":"post","data":"{"model":"text-davinci-003","prompt":"hi\n","temperature":0,"max_tokens":3000,"top_p":1,"frequency_penalty":0.5,"presence_penalty":0}","url":"https://api.openai.com/v1/completions"},"status":429}

i have the same error @Adylitto plz help me here

from project_openai_codex.

justtfun avatar justtfun commented on June 18, 2024

@Divyansh-singh08 i am also facing the same issue...please help

from project_openai_codex.

Adylitto avatar Adylitto commented on June 18, 2024

@Adylitto this is because the key that was in his code is already expired or out of credits, the best way to fix it is to get your own key and follow the steps to deploy the server, and then update the http on the script.js with the link of the new server. hope it helped.

Thank you very much 🙏🏽

from project_openai_codex.

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.