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.

oceanbase_config.py 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from pydantic import Field, PositiveInt
  2. from pydantic_settings import BaseSettings
  3. class OceanBaseVectorConfig(BaseSettings):
  4. """
  5. Configuration settings for OceanBase Vector database
  6. """
  7. OCEANBASE_VECTOR_HOST: str | None = Field(
  8. description="Hostname or IP address of the OceanBase Vector server (e.g. 'localhost')",
  9. default=None,
  10. )
  11. OCEANBASE_VECTOR_PORT: PositiveInt | None = Field(
  12. description="Port number on which the OceanBase Vector server is listening (default is 2881)",
  13. default=2881,
  14. )
  15. OCEANBASE_VECTOR_USER: str | None = Field(
  16. description="Username for authenticating with the OceanBase Vector database",
  17. default=None,
  18. )
  19. OCEANBASE_VECTOR_PASSWORD: str | None = Field(
  20. description="Password for authenticating with the OceanBase Vector database",
  21. default=None,
  22. )
  23. OCEANBASE_VECTOR_DATABASE: str | None = Field(
  24. description="Name of the OceanBase Vector database to connect to",
  25. default=None,
  26. )
  27. OCEANBASE_ENABLE_HYBRID_SEARCH: bool = Field(
  28. description="Enable hybrid search features (requires OceanBase >= 4.3.5.1). Set to false for compatibility "
  29. "with older versions",
  30. default=False,
  31. )
  32. OCEANBASE_FULLTEXT_PARSER: str | None = Field(
  33. description=(
  34. "Fulltext parser to use for text indexing. Options: 'japanese_ftparser' (Japanese), "
  35. "'thai_ftparser' (Thai), 'ik' (Chinese). Default is 'ik'"
  36. ),
  37. default="ik",
  38. )