Kajol Mehta
Kajol Mehta

Reputation: 75

Query Multiple Collection of PgVector using Langchain

I have multiple auth_id

auth_id_1 = "123"
auth_id_2 = "456"

Now I am using PGVector method to load data from it based on the collection

embeddings = OpenAIEmbeddings()
vector_store = PGVector(
        embedding_function=OpenAIEmbeddings(
            openai_api_key=openai_key, max_retries=MAX_RETRIES),
        collection_name=auth_id,
        connection_string=CONNECTION_STRING,
        distance_strategy=DISTANCE_STRATEGY
    )
    return vector_store

Can I pass Multiple auth_id in collection name, To Query Multiple User's Files

Upvotes: 1

Views: 519

Answers (0)

Related Questions