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 PGVectorConfig(BaseSettings):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
PGVector configs
|
|
|
|
"""
|
|
|
|
|
|
|
|
PGVECTOR_HOST: Optional[str] = Field(
|
|
|
|
description='PGVector host',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_PORT: Optional[PositiveInt] = Field(
|
|
|
|
description='PGVector port',
|
2024-06-26 21:01:16 +08:00
|
|
|
default=5433,
|
2024-06-20 16:24:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_USER: Optional[str] = Field(
|
|
|
|
description='PGVector user',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_PASSWORD: Optional[str] = Field(
|
|
|
|
description='PGVector password',
|
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_DATABASE: Optional[str] = Field(
|
|
|
|
description='PGVector database',
|
|
|
|
default=None,
|
|
|
|
)
|