dify/api/core/file/tool_file_parser.py

13 lines
344 B
Python
Raw Normal View History

2024-12-24 18:38:51 +08:00
from typing import TYPE_CHECKING, Any, cast
if TYPE_CHECKING:
from core.tools.tool_file_manager import ToolFileManager
tool_file_manager: dict[str, Any] = {"manager": None}
class ToolFileParser:
@staticmethod
def get_tool_file_manager() -> "ToolFileManager":
2024-12-24 18:38:51 +08:00
return cast("ToolFileManager", tool_file_manager["manager"])