You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

baidu_vector_config.py 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from pydantic import Field, NonNegativeInt, PositiveInt
  2. from pydantic_settings import BaseSettings
  3. class BaiduVectorDBConfig(BaseSettings):
  4. """
  5. Configuration settings for Baidu Vector Database
  6. """
  7. BAIDU_VECTOR_DB_ENDPOINT: str | None = Field(
  8. description="URL of the Baidu Vector Database service (e.g., 'http://vdb.bj.baidubce.com')",
  9. default=None,
  10. )
  11. BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: PositiveInt = Field(
  12. description="Timeout in milliseconds for Baidu Vector Database operations (default is 30000 milliseconds)",
  13. default=30000,
  14. )
  15. BAIDU_VECTOR_DB_ACCOUNT: str | None = Field(
  16. description="Account for authenticating with the Baidu Vector Database",
  17. default=None,
  18. )
  19. BAIDU_VECTOR_DB_API_KEY: str | None = Field(
  20. description="API key for authenticating with the Baidu Vector Database service",
  21. default=None,
  22. )
  23. BAIDU_VECTOR_DB_DATABASE: str | None = Field(
  24. description="Name of the specific Baidu Vector Database to connect to",
  25. default=None,
  26. )
  27. BAIDU_VECTOR_DB_SHARD: PositiveInt = Field(
  28. description="Number of shards for the Baidu Vector Database (default is 1)",
  29. default=1,
  30. )
  31. BAIDU_VECTOR_DB_REPLICAS: NonNegativeInt = Field(
  32. description="Number of replicas for the Baidu Vector Database (default is 3)",
  33. default=3,
  34. )