Skip to main content

agrag.vectordb.settings.WeaviateSettings

Bases: BaseSettings

Weaviate connection configuration.

Attributes:

  • mode (Literal['cloud', 'custom']) – "cloud" connects to Weaviate Cloud. "custom" connects to a self-hosted instance (used by integration tests against the local Docker Compose instance) — an explicit field, not inferred from the URL, since inference caused real connection bugs in surveyed reference implementations. Env: WEAVIATE_MODE.
  • url (str) – The Weaviate endpoint URL. For "cloud", the cluster URL. For "custom", the full host URL. Env: WEAVIATE_URL.
  • api_key (str) – The Weaviate API key. Env: WEAVIATE_API_KEY.
  • grpc_port (int) – The gRPC port, used by "custom" mode only ("cloud" mode infers it). Env: WEAVIATE_GRPC_PORT.
  • require_tls (bool) – When True, reject a plaintext url to a non-local host even with no api_key configured. Off by default since many deployments run an unauthenticated Weaviate on a private network and rely on network segmentation rather than transport encryption. Env: WEAVIATE_REQUIRE_TLS.

Raises:

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

api_key​

api_key: str = ''

grpc_port​

grpc_port: int = 50051

mode​

mode: Literal['cloud', 'custom'] = 'custom'

model_config​

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

require_tls​

require_tls: bool = False

url​

url: str = 'http://localhost:8080'