您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. DEFAULT_INDEX_TYPE: str | None = Field(
  20. description="Lindorm Vector Index Type, hnsw or flat is available in dify",
  21. default="hnsw",
  22. )
  23. DEFAULT_DISTANCE_TYPE: str | None = Field(
  24. description="Vector Distance Type, support l2, cosinesimil, innerproduct", default="l2"
  25. )
  26. USING_UGC_INDEX: bool | None = Field(
  27. description="Using UGC index will store the same type of Index in a single index but can retrieve separately.",
  28. default=False,
  29. )
  30. LINDORM_QUERY_TIMEOUT: float | None = Field(description="The lindorm search request timeout (s)", default=2.0)