Load vectorestore with a specific namespace

Hello everyone,

I’m encountering a challenge with an index that contains numerous namespaces, each dedicated to individual users. When a user requests a query, I need to load the vectorestore with that specific user’s namespace to answer the question. Unfortunately, I haven’t been able to locate a method for achieving this based on the documentation provided.

I’m utilizing Langchain for this purpose.

Here’s a simplified version of my code:

embeddings = OpenAIEmbeddings()

vectorstore = Pinecone(
    pinecone_index, embeddings.embed_query, "text"
)

chatgpt_chain = ConversationalRetrievalChain.from_llm(
    model,
    retriever=vectorstore.as_retriever(),
    memory=memory
)

Any insights or guidance would be greatly appreciated. Thank you!