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.

qdrant_config.py 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from pydantic import Field, NonNegativeInt, PositiveInt
  2. from pydantic_settings import BaseSettings
  3. class QdrantConfig(BaseSettings):
  4. """
  5. Configuration settings for Qdrant vector database
  6. """
  7. QDRANT_URL: str | None = Field(
  8. description="URL of the Qdrant server (e.g., 'http://localhost:6333' or 'https://qdrant.example.com')",
  9. default=None,
  10. )
  11. QDRANT_API_KEY: str | None = Field(
  12. description="API key for authenticating with the Qdrant server",
  13. default=None,
  14. )
  15. QDRANT_CLIENT_TIMEOUT: NonNegativeInt = Field(
  16. description="Timeout in seconds for Qdrant client operations (default is 20 seconds)",
  17. default=20,
  18. )
  19. QDRANT_GRPC_ENABLED: bool = Field(
  20. description="Whether to enable gRPC support for Qdrant connection (True for gRPC, False for HTTP)",
  21. default=False,
  22. )
  23. QDRANT_GRPC_PORT: PositiveInt = Field(
  24. description="Port number for gRPC connection to Qdrant server (default is 6334)",
  25. default=6334,
  26. )
  27. QDRANT_REPLICATION_FACTOR: PositiveInt = Field(
  28. description="Replication factor for Qdrant collections (default is 1)",
  29. default=1,
  30. )