2024-06-20 16:24:10 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-07-05 08:32:28 +08:00
|
|
|
from pydantic import BaseModel, Field, NonNegativeInt, PositiveInt
|
2024-06-20 16:24:10 +08:00
|
|
|
|
|
|
|
|
2024-06-22 18:26:38 +08:00
|
|
|
class TencentVectorDBConfig(BaseModel):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
Tencent Vector configs
|
|
|
|
"""
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_URL: Optional[str] = Field(
|
|
|
|
description='Tencent Vector URL',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_API_KEY: Optional[str] = Field(
|
2024-06-25 21:19:56 +08:00
|
|
|
description='Tencent Vector API key',
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field(
|
2024-06-25 21:19:56 +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-07-05 08:32:28 +08:00
|
|
|
description='Tencent Vector username',
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_PASSWORD: Optional[str] = Field(
|
|
|
|
description='Tencent Vector password',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_SHARD: PositiveInt = Field(
|
|
|
|
description='Tencent Vector sharding number',
|
|
|
|
default=1,
|
|
|
|
)
|
|
|
|
|
2024-07-05 08:32:28 +08:00
|
|
|
TENCENT_VECTOR_DB_REPLICAS: NonNegativeInt = Field(
|
2024-06-20 16:24:10 +08:00
|
|
|
description='Tencent Vector replicas',
|
|
|
|
default=2,
|
|
|
|
)
|
2024-07-02 21:31:14 +08:00
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_DATABASE: Optional[str] = Field(
|
|
|
|
description='Tencent Vector Database',
|
|
|
|
default=None,
|
|
|
|
)
|