ai-getting-started icon indicating copy to clipboard operation
ai-getting-started copied to clipboard

PineconeClient: Error calling upsert

Open zeke opened this issue 1 year ago • 6 comments

Hi there @ykhli and @jenniferli23 👋🏼

I'm an engineer at @replicatehq. I'm really excited about this project. Good idea to give people a starting point for building AI-powered apps. 👍🏼

I ran into the following issue while getting set up:

$ npm run generate-embeddings-pinecone

> [email protected] generate-embeddings-pinecone
> node src/scripts/indexBlogs.mjs

node:internal/process/esm_loader:97
    internalBinding('errors').triggerUncaughtException(
                              ^

[PineconeError: PineconeClient: Error calling upsert: PineconeError: PineconeClient: Error calling upsertRaw: FetchError: The request failed and the interceptors did not return an alternative response]

Node.js v18.13.0

I followed the README closely and I believe I have my env set up properly:

$ cat .env.local | grep PINECONE
PINECONE_API_KEY=772fXXXXXXXXXXXXXXXXXX
PINECONE_ENVIRONMENT=us-west1-gcp-free
PINECONE_INDEX=a16z-ai-getting-started

Did I miss something? 🤔

zeke avatar Jun 25 '23 21:06 zeke

Thanks @zeke!! I just double checked the pinecone setup and it appears to be working correctly for me. A few things I would look into to debug:

  • make sure the script is actually using the correct keys -- sometimes if you had done export PINECONE_API... on command line, it may take precedence over the one you set on .env.local.
  • Another thing i'd double check is the dimension on pinecone is set correctly (since we used OAI's embedding model, it should be set as 1536

Let me know if it works!

ykhli avatar Jun 25 '23 22:06 ykhli

Hey @ykhli. Thanks for following up.

make sure the script is actually using the correct keys

I used the keys in the example .env file so I think they're right?

double check is the dimension on pinecone

Yep I set that to 1536.

Screenshot 2023-06-26 at 9 57 22 AM

zeke avatar Jun 26 '23 16:06 zeke

I also encountered exact same issue above

elegant651 avatar Jun 29 '23 15:06 elegant651

I also encountered exact same issue above

Oh Now it works since there's wrong index name

elegant651 avatar Jun 29 '23 16:06 elegant651

@elegant651 what index name did you use to get it working?

zeke avatar Jun 30 '23 21:06 zeke

@zeke lmk if you solved the error? Based on your screenshot if you set PINECONE_INDEX=a16z-ai-getting-started and PINECONE_ENVIRONMENT=us-west1-gcp-free and your own PINECONE_API_KEY it should work

Happy to jump on a call to help you debug too. lmk!

ykhli avatar Jul 07 '23 00:07 ykhli

@zeke I wanted to follow up here and see if you need help. We will close this issue due to inactivity but feel free to reach out on discord if you need anything!

ykhli avatar Jul 20 '23 05:07 ykhli