weaviate_config.py 678 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. Weaviate configs
  7. """
  8. WEAVIATE_ENDPOINT: Optional[str] = Field(
  9. description="Weaviate endpoint URL",
  10. default=None,
  11. )
  12. WEAVIATE_API_KEY: Optional[str] = Field(
  13. description="Weaviate API key",
  14. default=None,
  15. )
  16. WEAVIATE_GRPC_ENABLED: bool = Field(
  17. description="whether to enable gRPC for Weaviate connection",
  18. default=True,
  19. )
  20. WEAVIATE_BATCH_SIZE: PositiveInt = Field(
  21. description="Weaviate batch size",
  22. default=100,
  23. )