weaviate_config.py 678 B

12345678910111213141516171819202122232425262728293031
  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. )