from pinecone.grpc import PineconeGRPC as Pinecone
from pinecone import ServerlessSpec
pc = Pinecone(api_key='api_key')
index_name = "quickstart"
if index_name not in pc.list_indexes().names():
pc.create_index(
name=index_name,
dimension=2,
metric="cosine",
spec=ServerlessSpec(
cloud='aws',
region='us-east-1'
)
)
if index_name not in pc.list_indexes().names():
print("Not Found")
docsearch = pcStore.from_texts([t.page_content for t in textChunks],embeddings,index_name=index_name)
Hello,
Langchain uses the normal Pinecone client and not the GRPC.
As per the error message can you install pinecone and and try again:
pip install pinecone-client
I have the install the library and still not working
@annertey90 Is it the same error? Can you provide the complete code snippet, please?