2024-06-20 16:24:10 +08:00
|
|
|
from typing import Optional
|
|
|
|
|
|
|
|
from pydantic import BaseModel, Field, PositiveInt
|
|
|
|
|
|
|
|
|
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(
|
|
|
|
description='Tencent Vector api key',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_TIMEOUT: PositiveInt = Field(
|
|
|
|
description='Tencent Vector timeout',
|
|
|
|
default=30,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_USERNAME: Optional[str] = Field(
|
|
|
|
description='Tencent Vector password',
|
|
|
|
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,
|
|
|
|
)
|
|
|
|
|
|
|
|
TENCENT_VECTOR_DB_REPLICAS: PositiveInt = Field(
|
|
|
|
description='Tencent Vector replicas',
|
|
|
|
default=2,
|
|
|
|
)
|