Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask a Book Questions - errors in Pinecone integration #62

Open
jseldess opened this issue Feb 28, 2024 · 0 comments
Open

Ask a Book Questions - errors in Pinecone integration #62

jseldess opened this issue Feb 28, 2024 · 0 comments

Comments

@jseldess
Copy link

https://github.com/gkamradt/langchain-tutorials/blob/main/data_generation/Ask%20A%20Book%20Questions.ipynb

The notebook is out of sync with the current version of Pinecone. Here are some thoughts:

  • from langchain.vectorstores import Chroma, Pinecone: I think it's better to install langchain_pinecone and use from langchain_pinecone import PineconeVectorStore: https://python.langchain.com/docs/integrations/vectorstores/pinecone
  • Using the latest Pinecone client installed by pip install pinecone-client, you'll need to change import pinecone to from pinecone import Pinecone. When creating an index, you'll also need to import the ServerlessSpec or PodSpec class.
  • With an up-to-date client, initialization is a little different and doesn't include environment. Instead of:
pinecone.init(
     api_key=PINECONE_API_KEY,  # find at app.pinecone.io
     environment=PINECONE_API_ENV  # next to api key in console
)

you use:

pc = Pinecone(api_key=PINECONE_API_KEY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant