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
|
|
|
"""
|
|
|
|
TiDB Vector configs
|
|
|
|
"""
|
|
|
|
|
|
|
|
TIDB_VECTOR_HOST: Optional[str] = Field(
|
|
|
|
description='TiDB Vector host',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_PORT: Optional[PositiveInt] = Field(
|
|
|
|
description='TiDB Vector port',
|
2024-06-26 21:01:16 +08:00
|
|
|
default=4000,
|
2024-06-20 16:24:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_USER: Optional[str] = Field(
|
|
|
|
description='TiDB Vector user',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_PASSWORD: Optional[str] = Field(
|
|
|
|
description='TiDB Vector password',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TIDB_VECTOR_DATABASE: Optional[str] = Field(
|
|
|
|
description='TiDB Vector database',
|
|
|
|
default=None,
|
|
|
|
)
|