weaviate_config.py 910 B

123456789101112131415161718192021222324252627282930
  1. from typing import Optional
  2. from pydantic import Field, PositiveInt
  3. from pydantic_settings import BaseSettings
  4. class WeaviateConfig(BaseSettings):
  5. """
  6. Configuration settings for Weaviate vector database
  7. """
  8. WEAVIATE_ENDPOINT: Optional[str] = Field(
  9. description="URL of the Weaviate server (e.g., 'http://localhost:8080' or 'https://weaviate.example.com')",
  10. default=None,
  11. )
  12. WEAVIATE_API_KEY: Optional[str] = Field(
  13. description="API key for authenticating with the Weaviate server",
  14. default=None,
  15. )
  16. WEAVIATE_GRPC_ENABLED: bool = Field(
  17. description="Whether to enable gRPC for Weaviate connection (True for gRPC, False for HTTP)",
  18. default=True,
  19. )
  20. WEAVIATE_BATCH_SIZE: PositiveInt = Field(
  21. description="Number of objects to be processed in a single batch operation (default is 100)",
  22. default=100,
  23. )