mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 21:43:44 +00:00
pinecone[patch], docs: PineconeVectorStore, release 0.0.3 (#17896)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user