Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: tool can not run (#12054)

yihong0ea6a926c5e7
diff --git a/api/models/tools.py b/api/models/tools.py
index 4151a2e9f63..13a112ee83b 100644
--- a/api/models/tools.py
+++ b/api/models/tools.py
@@ -1,5 +1,5 @@
import json
-from typing import Optional
+from typing import Any, Optional
import sqlalchemy as sa
from sqlalchemy import ForeignKey, func
@@ -282,8 +282,8 @@ class ToolConversationVariables(db.Model): # type: ignore[name-defined]
updated_at = db.Column(db.DateTime, nullable=False, server_default=func.current_timestamp())
@property
- def variables(self) -> dict:
- return dict(json.loads(self.variables_str))
+ def variables(self) -> Any:
+ return json.loads(self.variables_str)
class ToolFile(db.Model): # type: ignore[name-defined]