pinecone[patch], docs: PineconeVectorStore, release 0.0.3 (#17896)

This commit is contained in:
Erick Friis
2024-02-22 08:24:08 -08:00
committed by GitHub
parent e5e38e89ce
commit a53370a060
22 changed files with 130 additions and 128 deletions

View File

@@ -402,7 +402,9 @@ class Pinecone(VectorStore):
embeddings_chunk_size: int = 1000,
**kwargs: Any,
) -> Pinecone:
"""Construct Pinecone wrapper from raw documents.
"""
DEPRECATED: use langchain_pinecone.PineconeVectorStore.from_texts instead:
Construct Pinecone wrapper from raw documents.
This is a user friendly interface that:
1. Embeds documents.
@@ -411,21 +413,20 @@ class Pinecone(VectorStore):
This is intended to be a quick way to get started.
The `pool_threads` affects the speed of the upsert operations.
Example:
.. code-block:: python
from langchain_community.vectorstores import Pinecone
from langchain_community.embeddings import OpenAIEmbeddings
import pinecone
from langchain_pinecone import PineconeVectorStore
from langchain_openai import OpenAIEmbeddings
# The environment should be the one specified next to the API key
# in your Pinecone console
pinecone.init(api_key="***", environment="...")
embeddings = OpenAIEmbeddings()
pinecone = Pinecone.from_texts(
texts,
embeddings,
index_name="langchain-demo"
index_name = "my-index"
namespace = "my-namespace"
vectorstore = Pinecone(
index_name=index_name,
embedding=embedding,
namespace=namespace,
)
"""
pinecone_index = cls.get_pinecone_index(index_name, pool_threads)