Skip to main content

agrag.vectordb.settings.MilvusSettings

Bases: BaseSettings

Milvus connection configuration.

Attributes:

  • uri (str) – The Milvus endpoint URI. Env: MILVUS_URI.
  • token (str) – The Milvus auth token. Empty string for an unauthenticated instance. Env: MILVUS_TOKEN.
  • require_tls (bool) – When True, reject a plaintext uri to a non-local host even with no token configured. Off by default since many deployments run an unauthenticated Milvus on a private network and rely on network segmentation rather than transport encryption. Env: MILVUS_REQUIRE_TLS.

Raises:

  • ValueError – uri is plaintext (http), points at a non-local host, and either token is set or require_tls is True. Use https for a remote Milvus instance.

model_config​

model_config = SettingsConfigDict(env_prefix='MILVUS_', env_file='.env', extra='ignore', hide_input_in_errors=True)

require_tls​

require_tls: bool = False

token​

token: str = ''

uri​

uri: str = 'http://localhost:19530'