pgvectors_config.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. from typing import Optional
  2. from pydantic import Field, PositiveInt
  3. from pydantic_settings import BaseSettings
  4. class PGVectoRSConfig(BaseSettings):
  5. """
  6. Configuration settings for PGVecto.RS (Rust-based vector extension for PostgreSQL)
  7. """
  8. PGVECTO_RS_HOST: Optional[str] = Field(
  9. description="Hostname or IP address of the PostgreSQL server with PGVecto.RS extension (e.g., 'localhost')",
  10. default=None,
  11. )
  12. PGVECTO_RS_PORT: PositiveInt = Field(
  13. description="Port number on which the PostgreSQL server with PGVecto.RS is listening (default is 5431)",
  14. default=5431,
  15. )
  16. PGVECTO_RS_USER: Optional[str] = Field(
  17. description="Username for authenticating with the PostgreSQL database using PGVecto.RS",
  18. default=None,
  19. )
  20. PGVECTO_RS_PASSWORD: Optional[str] = Field(
  21. description="Password for authenticating with the PostgreSQL database using PGVecto.RS",
  22. default=None,
  23. )
  24. PGVECTO_RS_DATABASE: Optional[str] = Field(
  25. description="Name of the PostgreSQL database with PGVecto.RS extension to connect to",
  26. default=None,
  27. )