您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

tencent_vector_config.py 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. from pydantic import Field, NonNegativeInt, PositiveInt
  2. from pydantic_settings import BaseSettings
  3. class TencentVectorDBConfig(BaseSettings):
  4. """
  5. Configuration settings for Tencent Vector Database
  6. """
  7. TENCENT_VECTOR_DB_URL: str | None = Field(
  8. description="URL of the Tencent Vector Database service (e.g., 'https://vectordb.tencentcloudapi.com')",
  9. default=None,
  10. )
  11. TENCENT_VECTOR_DB_API_KEY: str | None = Field(
  12. description="API key for authenticating with the Tencent Vector Database service",
  13. default=None,
  14. )
  15. TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field(
  16. description="Timeout in seconds for Tencent Vector Database operations (default is 30 seconds)",
  17. default=30,
  18. )
  19. TENCENT_VECTOR_DB_USERNAME: str | None = Field(
  20. description="Username for authenticating with the Tencent Vector Database (if required)",
  21. default=None,
  22. )
  23. TENCENT_VECTOR_DB_PASSWORD: str | None = Field(
  24. description="Password for authenticating with the Tencent Vector Database (if required)",
  25. default=None,
  26. )
  27. TENCENT_VECTOR_DB_SHARD: PositiveInt = Field(
  28. description="Number of shards for the Tencent Vector Database (default is 1)",
  29. default=1,
  30. )
  31. TENCENT_VECTOR_DB_REPLICAS: NonNegativeInt = Field(
  32. description="Number of replicas for the Tencent Vector Database (default is 2)",
  33. default=2,
  34. )
  35. TENCENT_VECTOR_DB_DATABASE: str | None = Field(
  36. description="Name of the specific Tencent Vector Database to connect to",
  37. default=None,
  38. )
  39. TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH: bool = Field(
  40. description="Enable hybrid search features",
  41. default=False,
  42. )