aws-samples / aws-serverless-openai-chatbot-demo

MIT No Attribution
133 stars 55 forks source link

can't login with Error: 401,undefined, #68

Open sunraysir opened 1 month ago

sunraysir commented 1 month ago

Hi Master,

followed the step to configure, but can't login with Error: 401,undefined, may I know any missing

sunraysir commented 1 month ago

I can login, but got the message "Ops! Error: 500,{"message":"Internal Server Error"}" when chat

sunraysir commented 1 month ago

Ops! Error: 500,{"message":"Request failed with status code 401","name":"Error","stack":"Error: Request failed with status code 401\n at createError (/var/task/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/var/task/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/var/task/node_modules/axios/lib/adapters/http.js:322:11)\n at IncomingMessage.emit (node:events:529:35)\n at endReadableNT (node:internal/streams/readable:1400:12)\n at process.processTicksAndRejections (node:internal/process/task_queues: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 sk-None-iv8jFB8BdlAW9uDt8","Content-Length":139},"method":"post","data":"{"model":"text-davinci-003","prompt":"\ndfggfd","temperature":0,"max_tokens":2000,"top_p":1,"frequency_penalty":0.5,"presence_penalty":0.1}","url":"https://api.openai.com/v1/completions"},"status":401}