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 PGVectoRSConfig(BaseSettings):
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
2024-09-22 12:38:41 +07:00
|
|
|
Configuration settings for PGVecto.RS (Rust-based vector extension for PostgreSQL)
|
2024-06-20 16:24:10 +08:00
|
|
|
"""
|
|
|
|
|
|
|
|
PGVECTO_RS_HOST: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Hostname or IP address of the PostgreSQL server with PGVecto.RS extension (e.g., 'localhost')",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
2024-10-14 23:47:58 +08:00
|
|
|
PGVECTO_RS_PORT: PositiveInt = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Port number on which the PostgreSQL server with PGVecto.RS is listening (default is 5431)",
|
2024-06-26 21:01:16 +08:00
|
|
|
default=5431,
|
2024-06-20 16:24:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTO_RS_USER: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Username for authenticating with the PostgreSQL database using PGVecto.RS",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTO_RS_PASSWORD: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Password for authenticating with the PostgreSQL database using PGVecto.RS",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|
|
|
|
|
|
|
|
PGVECTO_RS_DATABASE: Optional[str] = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Name of the PostgreSQL database with PGVecto.RS extension to connect to",
|
2024-06-20 16:24:10 +08:00
|
|
|
default=None,
|
|
|
|
)
|