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.

lindorm_config.py 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. from pydantic import Field
  2. from pydantic_settings import BaseSettings
  3. class LindormConfig(BaseSettings):
  4. """
  5. Lindorm configs
  6. """
  7. LINDORM_URL: str | None = Field(
  8. description="Lindorm url",
  9. default=None,
  10. )
  11. LINDORM_USERNAME: str | None = Field(
  12. description="Lindorm user",
  13. default=None,
  14. )
  15. LINDORM_PASSWORD: str | None = Field(
  16. description="Lindorm password",
  17. default=None,
  18. )
  19. LINDORM_INDEX_TYPE: str | None = Field(
  20. description="Lindorm Vector Index Type, hnsw or flat is available in dify",
  21. default="hnsw",
  22. )
  23. LINDORM_DISTANCE_TYPE: str | None = Field(
  24. description="Vector Distance Type, support l2, cosinesimil, innerproduct", default="l2"
  25. )
  26. LINDORM_USING_UGC: bool | None = Field(
  27. description="Using UGC index will store indexes with the same IndexType/Dimension in a single big index.",
  28. default=True,
  29. )
  30. LINDORM_QUERY_TIMEOUT: float | None = Field(description="The lindorm search request timeout (s)", default=2.0)