cryptocurrency-gpt icon indicating copy to clipboard operation
cryptocurrency-gpt copied to clipboard

Problem in running the code

Open mhmzdev opened this issue 7 months ago • 8 comments

Getting this error, I've just cloned the repo and tried npm run dev with all the packages installed and I'm getting this error. Any leads how to get it resolved? I've already placed the api_key in the openAI function

hamza@M1-Max cryptocurrency-gpt % npm run dev

> dev
> astro dev

  🚀  astro  v2.9.0 started in 72ms
  
  ┃ Local    http://localhost:3000/
  ┃ Network  use --host to expose
  
 error   Request failed with status code 401
  File:
    /Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/core/createError.js:16:15
  Code:
    15 | module.exports = function createError(message, config, code, request, response) {
    > 16 |   var error = new Error(message);
         |               ^
      17 |   return enhanceError(error, config, code, request, response);
      18 | };
  Stacktrace:
Error: Request failed with status code 401
    at createError (/Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/Users/hamza/Development/Work/cryptocurrency-gpt/node_modules/openai/node_modules/axios/lib/adapters/http.js:322:11)
    at IncomingMessage.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1408:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

mhmzdev avatar Nov 24 '23 05:11 mhmzdev