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) – WhenTrue, reject a plaintexturlto a non-local host even with noapi_keyconfigured. 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–urlis plaintext (http), points at a non-local host, and eitherapi_keyis set orrequire_tlsisTrue. Usehttpsfor 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'