Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011
  1. from typing import Any
  2. # TODO(QuantumGhost): Refactor variable type identification. Instead of directly
  3. # comparing `dify_model_identity` with constants throughout the codebase, extract
  4. # this logic into a dedicated function. This would encapsulate the implementation
  5. # details of how different variable types are identified.
  6. FILE_MODEL_IDENTITY = "__dify__file__"
  7. def maybe_file_object(o: Any) -> bool:
  8. return isinstance(o, dict) and o.get("dify_model_identity") == FILE_MODEL_IDENTITY