We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4f719c commit 2824f36Copy full SHA for 2824f36
langchain/vectorstores/pinecone.py
@@ -224,7 +224,11 @@ def from_texts(
224
225
@classmethod
226
def from_existing_index(
227
- cls, index_name: str, embedding: Embeddings, text_key: str = "text"
+ cls,
228
+ index_name: str,
229
+ embedding: Embeddings,
230
+ text_key: str = "text",
231
+ namespace: Optional[str] = None,
232
) -> Pinecone:
233
"""Load pinecone vectorstore from index name."""
234
try:
@@ -235,4 +239,6 @@ def from_existing_index(
235
239
"Please install it with `pip install pinecone-client`."
236
240
)
237
241
238
- return cls(pinecone.Index(index_name), embedding.embed_query, text_key)
242
+ return cls(
243
+ pinecone.Index(index_name, namespace), embedding.embed_query, text_key
244
+ )
0 commit comments