2024-06-20 16:24:10 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
from pydantic import Field, PositiveInt
|
|
|
|
from pydantic_settings import BaseSettings
|
2024-06-20 16:24:10 +08:00
|
|
|
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
class TiDBVectorConfig(BaseSettings):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
2024-09-22 12:38:41 +07:00
|
|
|
Configuration settings for TiDB Vector database
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
|
|
|
|
TIDB_VECTOR_HOST: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Hostname or IP address of the TiDB Vector server (e.g., 'localhost' or 'tidb.example.com')",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_PORT: Optional[PositiveInt] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Port number on which the TiDB Vector server is listening (default is 4000)",
|
2024-06-26 21:01:16 +08:00
|
|
|
default=4000,
|
2024-06-20 16:24:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_USER: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Username for authenticating with the TiDB Vector database",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_PASSWORD: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Password for authenticating with the TiDB Vector database",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_DATABASE: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Name of the TiDB Vector database to connect to",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|