pgvectors_config.py 768 B

1234567891011121314151617181920212223242526272829303132333435
  1. from typing import Optional
  2. from pydantic import Field, PositiveInt
  3. from pydantic_settings import BaseSettings
  4. class PGVectoRSConfig(BaseSettings):
  5. """
  6. PGVectoRS configs
  7. """
  8. PGVECTO_RS_HOST: Optional[str] = Field(
  9. description="PGVectoRS host",
  10. default=None,
  11. )
  12. PGVECTO_RS_PORT: Optional[PositiveInt] = Field(
  13. description="PGVectoRS port",
  14. default=5431,
  15. )
  16. PGVECTO_RS_USER: Optional[str] = Field(
  17. description="PGVectoRS user",
  18. default=None,
  19. )
  20. PGVECTO_RS_PASSWORD: Optional[str] = Field(
  21. description="PGVectoRS password",
  22. default=None,
  23. )
  24. PGVECTO_RS_DATABASE: Optional[str] = Field(
  25. description="PGVectoRS database",
  26. default=None,
  27. )