qdrant_configs.py 765 B

12345678910111213141516171819202122232425262728293031323334
  1. from typing import Optional
  2. from pydantic import BaseModel, Field, NonNegativeInt, PositiveInt
  3. class QdrantConfigs(BaseModel):
  4. """
  5. Qdrant configs
  6. """
  7. QDRANT_URL: Optional[str] = Field(
  8. description='Qdrant url',
  9. default=None,
  10. )
  11. QDRANT_API_KEY: Optional[str] = Field(
  12. description='Qdrant api key',
  13. default=None,
  14. )
  15. QDRANT_CLIENT_TIMEOUT: NonNegativeInt = Field(
  16. description='Qdrant client timeout in seconds',
  17. default=20,
  18. )
  19. QDRANT_GRPC_ENABLED: bool = Field(
  20. description='whether enable grpc support for Qdrant connection',
  21. default=False,
  22. )
  23. QDRANT_GRPC_PORT: PositiveInt = Field(
  24. description='Qdrant grpc port',
  25. default=6334,
  26. )