pgvector_config.py 716 B

12345678910111213141516171819202122232425262728293031323334
  1. from typing import Optional
  2. from pydantic import BaseModel, Field, PositiveInt
  3. class PGVectorConfig(BaseModel):
  4. """
  5. PGVector configs
  6. """
  7. PGVECTOR_HOST: Optional[str] = Field(
  8. description='PGVector host',
  9. default=None,
  10. )
  11. PGVECTOR_PORT: Optional[PositiveInt] = Field(
  12. description='PGVector port',
  13. default=5433,
  14. )
  15. PGVECTOR_USER: Optional[str] = Field(
  16. description='PGVector user',
  17. default=None,
  18. )
  19. PGVECTOR_PASSWORD: Optional[str] = Field(
  20. description='PGVector password',
  21. default=None,
  22. )
  23. PGVECTOR_DATABASE: Optional[str] = Field(
  24. description='PGVector database',
  25. default=None,
  26. )