mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 22:42:05 +00:00
pinecone: Add embedding Inference Support (#24515)
**Description** Add support for Pinecone hosted embedding models as `PineconeEmbeddings`. Replacement for #22890 **Dependencies** Add `aiohttp` to support async embeddings call against REST directly - [x] **Add tests and docs**: If you're adding a new integration, please include Added `docs/docs/integrations/text_embedding/pinecone.ipynb` - [x] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/ Twitter: `gdjdg17` --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
@@ -40,13 +40,12 @@ class PineconeVectorStore(VectorStore):
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_pinecone import PineconeVectorStore
|
||||
from langchain_openai import OpenAIEmbeddings
|
||||
from langchain_pinecone import PineconeVectorStore, PineconeEmbeddings
|
||||
|
||||
embeddings = OpenAIEmbeddings()
|
||||
embeddings = PineconeEmbeddings(model="multilingual-e5-large")
|
||||
index_name = "my-index"
|
||||
namespace = "my-namespace"
|
||||
vectorstore = Pinecone(
|
||||
vectorstore = PineconeVectorStore(
|
||||
index_name=index_name,
|
||||
embedding=embedding,
|
||||
namespace=namespace,
|
||||
@@ -439,10 +438,10 @@ class PineconeVectorStore(VectorStore):
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_pinecone import PineconeVectorStore
|
||||
from langchain_openai import OpenAIEmbeddings
|
||||
from langchain_pinecone import PineconeVectorStore, PineconeEmbeddings
|
||||
|
||||
embeddings = PineconeEmbeddings(model="multilingual-e5-large")
|
||||
|
||||
embeddings = OpenAIEmbeddings()
|
||||
index_name = "my-index"
|
||||
vectorstore = PineconeVectorStore.from_texts(
|
||||
texts,
|
||||
|
Reference in New Issue
Block a user