tencent_vector_config.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. from typing import Optional
  2. from pydantic import Field, NonNegativeInt, PositiveInt
  3. from pydantic_settings import BaseSettings
  4. class TencentVectorDBConfig(BaseSettings):
  5. """
  6. Tencent Vector configs
  7. """
  8. TENCENT_VECTOR_DB_URL: Optional[str] = Field(
  9. description='Tencent Vector URL',
  10. default=None,
  11. )
  12. TENCENT_VECTOR_DB_API_KEY: Optional[str] = Field(
  13. description='Tencent Vector API key',
  14. default=None,
  15. )
  16. TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field(
  17. description='Tencent Vector timeout in seconds',
  18. default=30,
  19. )
  20. TENCENT_VECTOR_DB_USERNAME: Optional[str] = Field(
  21. description='Tencent Vector username',
  22. default=None,
  23. )
  24. TENCENT_VECTOR_DB_PASSWORD: Optional[str] = Field(
  25. description='Tencent Vector password',
  26. default=None,
  27. )
  28. TENCENT_VECTOR_DB_SHARD: PositiveInt = Field(
  29. description='Tencent Vector sharding number',
  30. default=1,
  31. )
  32. TENCENT_VECTOR_DB_REPLICAS: NonNegativeInt = Field(
  33. description='Tencent Vector replicas',
  34. default=2,
  35. )
  36. TENCENT_VECTOR_DB_DATABASE: Optional[str] = Field(
  37. description='Tencent Vector Database',
  38. default=None,
  39. )