Closed deweyai closed 1 year ago
Hey, I think this is a 401 unauthorized error, so there's an issue with your API key not the repo. Have you used up your 'usage' for the api key or violated any moderation terms or exceeded rate limits? Does the api key work through direct calls i.e. postman
Thanks mayooear - I checked with postman and using the same api key I can successfully get embeddings from https://api.openai.com/v1/embeddings
Strange - I noticed the Bearer in the error message is not the API key from my .env file.
Guess I need to figure out where that's coming from - it doesn't match any OpenAI api I have. đź‘Ž
] error [Error: Request failed with status code 401] { config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [AsyncFunction: fetchAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], headers: { Accept: 'application/json, text/plain, /', 'Content-Type': 'application/json', 'User-Agent': 'OpenAI/NodeJS/3.2.1', Authorization: 'Bearer sk-NOT_MY_API_KEY' },
you can add in advance system settings under User Variable to match the Authorization but now my error code is 429. Too Many request
response: { ok: false, status: 429, statusText: 'Too Many Requests',
@hakimhaniff YOU ROCK.
Not sure how I missed that but I had an OLD env variable that had that key... saved my life. đź‘Ť
Hello all. Looking for a little help - I've walked through this step by step and apparently I need another set of eyes.
I read through the issues but none were quite the same as this. :\
I have double checked all API keys and I've tried multiple Pinecone databases, although this seems to point to unauthorized which doesn't make sense because the OpenAI key is valid.
If anyone can see what I'm missing I'd appreciate it. đź’Ż
` url: 'https://api.openai.com/v1/embeddings' }, request: Request { [Symbol(realm)]: { settingsObject: [Object] },
}, response: { ok: false, status: 401, statusText: 'Unauthorized', headers: HeadersList {
}, isAxiosError: true, toJSON: [Function: toJSON] } e:\DEV\LANG\gpt4-pdf-chatbot-langchain\scripts\ingest-data.ts:51 throw new Error('Failed to ingest your data'); ^
[Error: Failed to ingest your data]
Node.js v18.14.0  ELIFECYCLE  Command failed with exit code 1.`