You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pgvector_config.py 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. from pydantic import Field, PositiveInt
  2. from pydantic_settings import BaseSettings
  3. class PGVectorConfig(BaseSettings):
  4. """
  5. Configuration settings for PGVector (PostgreSQL with vector extension)
  6. """
  7. PGVECTOR_HOST: str | None = Field(
  8. description="Hostname or IP address of the PostgreSQL server with PGVector extension (e.g., 'localhost')",
  9. default=None,
  10. )
  11. PGVECTOR_PORT: PositiveInt = Field(
  12. description="Port number on which the PostgreSQL server is listening (default is 5433)",
  13. default=5433,
  14. )
  15. PGVECTOR_USER: str | None = Field(
  16. description="Username for authenticating with the PostgreSQL database",
  17. default=None,
  18. )
  19. PGVECTOR_PASSWORD: str | None = Field(
  20. description="Password for authenticating with the PostgreSQL database",
  21. default=None,
  22. )
  23. PGVECTOR_DATABASE: str | None = Field(
  24. description="Name of the PostgreSQL database to connect to",
  25. default=None,
  26. )
  27. PGVECTOR_MIN_CONNECTION: PositiveInt = Field(
  28. description="Min connection of the PostgreSQL database",
  29. default=1,
  30. )
  31. PGVECTOR_MAX_CONNECTION: PositiveInt = Field(
  32. description="Max connection of the PostgreSQL database",
  33. default=5,
  34. )
  35. PGVECTOR_PG_BIGM: bool = Field(
  36. description="Whether to use pg_bigm module for full text search",
  37. default=False,
  38. )