I am trying to create embeddings for the chunk text which I have created, but when I try to use the method from_texts, i am getting the following error
AttributeError: 'Pinecone' object has no attribute 'from_texts'
This is my code.
model_name = "sentence-transformers/all-mpnet-base-v2"
model_kwargs = {'device': 'cpu'}
encode_kwargs = {'normalize_embeddings': False}
hf = HuggingFaceEmbeddings(
model_name=model_name,
model_kwargs=model_kwargs,
encode_kwargs=encode_kwargs
)
pc = Pinecone(api_key=pinecone_api_key)
pc.Index=pinecone_index
pc.from_texts([t.page_content for t in text_chunks],hf,pinecone_index)
Is this method got depreceated? what is the alternate method for this