tencent_vector_config.py 1.6 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. Configuration settings for Tencent Vector Database
  7. """
  8. TENCENT_VECTOR_DB_URL: Optional[str] = Field(
  9. description="URL of the Tencent Vector Database service (e.g., 'https://vectordb.tencentcloudapi.com')",
  10. default=None,
  11. )
  12. TENCENT_VECTOR_DB_API_KEY: Optional[str] = Field(
  13. description="API key for authenticating with the Tencent Vector Database service",
  14. default=None,
  15. )
  16. TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field(
  17. description="Timeout in seconds for Tencent Vector Database operations (default is 30 seconds)",
  18. default=30,
  19. )
  20. TENCENT_VECTOR_DB_USERNAME: Optional[str] = Field(
  21. description="Username for authenticating with the Tencent Vector Database (if required)",
  22. default=None,
  23. )
  24. TENCENT_VECTOR_DB_PASSWORD: Optional[str] = Field(
  25. description="Password for authenticating with the Tencent Vector Database (if required)",
  26. default=None,
  27. )
  28. TENCENT_VECTOR_DB_SHARD: PositiveInt = Field(
  29. description="Number of shards for the Tencent Vector Database (default is 1)",
  30. default=1,
  31. )
  32. TENCENT_VECTOR_DB_REPLICAS: NonNegativeInt = Field(
  33. description="Number of replicas for the Tencent Vector Database (default is 2)",
  34. default=2,
  35. )
  36. TENCENT_VECTOR_DB_DATABASE: Optional[str] = Field(
  37. description="Name of the specific Tencent Vector Database to connect to",
  38. default=None,
  39. )