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(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="PGVector host",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_PORT: Optional[PositiveInt] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
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(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="PGVector user",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_PASSWORD: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="PGVector password",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTOR_DATABASE: Optional[str] = Field(
|
2024-08-23 23:46:01 +08:00
|
|
|
description="PGVector database",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|