Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add external milvus database option #125

Merged

Conversation

SkyHive
Copy link
Contributor

@SkyHive SkyHive commented Feb 18, 2025

Adds support for specifying a custom Milvus database.

Problem:

The current implementation hardcodes the "default" database name for Milvus. External Milvus instances may require a different database name.

Solution:

Introduces the MILVUS_DATABASE environment variable to allow users to specify the database to use when connecting to an external Milvus instance.

Details:

  • Adds MILVUS_DATABASE to templates/config.tpl.
  • Adds externalMilvus.database option in values.yaml

Usage:

Set externalMilvus.database in your values.yaml file to the desired database name.

Benefits:

  • Enables Dify to connect to external Milvus instances using custom database names.

@BorisPolonsky
Copy link
Owner

BorisPolonsky commented Feb 18, 2025

Thanks for your contribution. However we couldn't find this option in current version of dify. https://github.com/langgenius/dify/blob/4dae0e514e1b149ea74e42056fcc520ad60b8c04/docker/docker-compose.yaml#L137-L141

@SkyHive
Copy link
Contributor Author

SkyHive commented Feb 18, 2025

Thanks for your contribution. However we couldn't find this option in current version of dify. https://github.com/langgenius/dify/blob/4dae0e514e1b149ea74e42056fcc520ad60b8c04/docker/docker-compose.yaml#L137-L141

You're right that MILVUS_DATABASE isn't explicitly in the docker-compose files. However,the code actually already supports reading this environment variable to configure the Milvus database connection.
https://github.com/langgenius/dify/blob/main/api/configs/middleware/vdb/milvus_config.py#L32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants