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: 'validation error for ToolInvokeMessage' when blob_message meta is None (#11212)

catusaxd96a28487a44
diff --git a/api/core/tools/tool/tool.py b/api/core/tools/tool/tool.py
index 38a05ccf91f..8d404503817 100644
--- a/api/core/tools/tool/tool.py
+++ b/api/core/tools/tool/tool.py
@@ -324,7 +324,12 @@ class Tool(BaseModel, ABC):
:param blob: the blob
:return: the blob message
"""
- return ToolInvokeMessage(type=ToolInvokeMessage.MessageType.BLOB, message=blob, meta=meta, save_as=save_as)
+ return ToolInvokeMessage(
+ type=ToolInvokeMessage.MessageType.BLOB,
+ message=blob,
+ meta=meta or {},
+ save_as=save_as,
+ )
def create_json_message(self, object: dict) -> ToolInvokeMessage:
"""