選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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