from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatasConstruct Pinecone wrapper from raw documents.
This is a user-friendly interface that:
This is intended to be a quick way to get started.
The pool_threads affects the speed of the upsert operations.
Setup: set the PINECONE_API_KEY environment variable to your Pinecone API key.
Example:
from langchain_pinecone import PineconeVectorStore, PineconeEmbeddings
embeddings = PineconeEmbeddings(model="multilingual-e5-large")
index_name = "my-index"
vectorstore = PineconeVectorStore.from_texts(
texts,
index_name=index_name,
embedding=embedding,
namespace=namespace,
)