You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners/pinecone
Vwake04 0deb98ac0c
pinecone: Fix multiprocessing issue in PineconeVectorStore (#22571)
**Description:**

Currently, the `langchain_pinecone` library forces the `async_req`
(asynchronous required) argument to Pinecone to `True`. This design
choice causes problems when deploying to environments that do not
support multiprocessing, such as AWS Lambda. In such environments, this
restriction can prevent users from successfully using
`langchain_pinecone`.

This PR introduces a change that allows users to specify whether they
want to use asynchronous requests by passing the `async_req` parameter
through `**kwargs`. By doing so, users can set `async_req=False` to
utilize synchronous processing, making the library compatible with AWS
Lambda and other environments that do not support multithreading.

**Issue:**
This PR does not address a specific issue number but aims to resolve
compatibility issues with AWS Lambda by allowing synchronous processing.

**Dependencies:**
None, that I'm aware of.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
3 months ago
..
langchain_pinecone pinecone: Fix multiprocessing issue in PineconeVectorStore (#22571) 3 months ago
scripts infra: add print rule to ruff (#16221) 7 months ago
tests pinecone: Fix multiprocessing issue in PineconeVectorStore (#22571) 3 months ago
.gitignore pinecone: init pkg (#16556) 7 months ago
LICENSE pinecone: init pkg (#16556) 7 months ago
Makefile pinecone[patch], docs: PineconeVectorStore, release 0.0.3 (#17896) 7 months ago
README.md docs: update pinecone README to use PineconeVectorStore (#18170) 7 months ago
poetry.lock pinecone[patch]: Update Poetry requirements for pinecone-client >=3.2.2 (#22094) 3 months ago
pyproject.toml pinecone[patch]: Update Poetry requirements for pinecone-client >=3.2.2 (#22094) 3 months ago

README.md

langchain-pinecone

This package contains the LangChain integration with Pinecone.

Installation

pip install -U langchain-pinecone

And you should configure credentials by setting the following environment variables:

  • PINECONE_API_KEY
  • PINECONE_INDEX_NAME

Usage

The PineconeVectorStore class exposes the connection to the Pinecone vector store.

from langchain_pinecone import PineconeVectorStore

embeddings = ... # use a LangChain Embeddings class

vectorstore = PineconeVectorStore(embeddings=embeddings)