2024-06-20 16:24:10 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
from pydantic import Field, NonNegativeInt, PositiveInt
|
|
|
|
from pydantic_settings import BaseSettings
|
2024-06-20 16:24:10 +08:00
|
|
|
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
class TencentVectorDBConfig(BaseSettings):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
Tencent Vector configs
|
|
|
|
"""
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_URL: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector URL",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_API_KEY: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector API key",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector timeout in seconds",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=30,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_USERNAME: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector username",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_PASSWORD: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector password",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_SHARD: PositiveInt = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector sharding number",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=1,
|
|
|
|
)
|
|
|
|
|
2024-07-05 08:32:28 +08:00
|
|
|
TENCENT_VECTOR_DB_REPLICAS: NonNegativeInt = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector replicas",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=2,
|
|
|
|
)
|
2024-07-02 21:31:14 +08:00
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_DATABASE: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="Tencent Vector Database",
|
2024-07-02 21:31:14 +08:00
|
|
|
default=None,
|
|
|
|
)
|