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.

constants.py 494B

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