Skip to content

[Feature]: Support for specifying database name in Milvus #647

@tvvignesh

Description

@tvvignesh

Is your feature request related to a problem? Please describe.

I have a multi tenant system built with Milvus, Langchain, etc. and this works with each bot having its own database in Milvus with different collections within. I integrated GPTCache with Milvus and Postgres. While it works fine and returns back responses from the cache, I am looking to specify the database name where the Vectors are to be stored using GPTCache but I don't have a provision for that as of today.

This is how I specify the DB name typically in Milvus using the db_name parameter:

vectorstore = Milvus(
            embeddings,
            collection_name=collection_name,
            auto_id=True,
            connection_args={
                "user": self.user,
                "password": self.password,
                "host": self.host,
                "port": self.port,
                "db_name": self.db_name,
            },
            index_params={},
            drop_old=shouldDrop
        )

This is what I can specify in GPTCache today

vector_base=VectorBase(
                    name='milvus',
                    host=os.getenv("MILVUS_DB_HOST"),
                    port=os.getenv("MILVUS_DB_PORT"),
                    user=os.getenv("MILVUS_DB_USERNAME"),
                    password=os.getenv("MILVUS_DB_PASSWORD"),
                    collection_name=<my_collection_name>,
                    dimension=768
                )

Describe the solution you'd like.

Requesting to add connection_args parameter for specifying db_name

Describe an alternate solution.

No response

Anything else? (Additional Context)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions