a16z-infra / ai-getting-started

A Javascript AI getting started stack for weekend projects, including image/text models, vector stores, auth, and deployment configs
https://ai-getting-started.com/
MIT License
3.95k stars 637 forks source link

PineconeClient: Error calling upsert #38

Closed zeke closed 11 months ago

zeke commented 1 year ago

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

> ai-getting-started@0.0.0 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? 🤔

ykhli commented 1 year ago

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:

Let me know if it works!

zeke commented 1 year ago

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

elegant651 commented 1 year ago

I also encountered exact same issue above

elegant651 commented 1 year ago

I also encountered exact same issue above

Oh Now it works since there's wrong index name

zeke commented 1 year ago

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

ykhli commented 1 year ago

@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 commented 11 months ago

@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!