tidb_vector_config.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. from typing import Optional
  2. from pydantic import Field, PositiveInt
  3. from pydantic_settings import BaseSettings
  4. class TiDBVectorConfig(BaseSettings):
  5. """
  6. Configuration settings for TiDB Vector database
  7. """
  8. TIDB_VECTOR_HOST: Optional[str] = Field(
  9. description="Hostname or IP address of the TiDB Vector server (e.g., 'localhost' or 'tidb.example.com')",
  10. default=None,
  11. )
  12. TIDB_VECTOR_PORT: Optional[PositiveInt] = Field(
  13. description="Port number on which the TiDB Vector server is listening (default is 4000)",
  14. default=4000,
  15. )
  16. TIDB_VECTOR_USER: Optional[str] = Field(
  17. description="Username for authenticating with the TiDB Vector database",
  18. default=None,
  19. )
  20. TIDB_VECTOR_PASSWORD: Optional[str] = Field(
  21. description="Password for authenticating with the TiDB Vector database",
  22. default=None,
  23. )
  24. TIDB_VECTOR_DATABASE: Optional[str] = Field(
  25. description="Name of the TiDB Vector database to connect to",
  26. default=None,
  27. )