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: correct response hint for generated image to avoid illusion of regernerated image link (#2962)

Bowen Liang129a9850eb3a
diff --git a/api/core/features/assistant_base_runner.py b/api/core/features/assistant_base_runner.py
index 1d9541070f8..b43d1cd40ed 100644
--- a/api/core/features/assistant_base_runner.py
+++ b/api/core/features/assistant_base_runner.py
@@ -145,7 +145,7 @@ class BaseAssistantApplicationRunner(AppRunner):
result += f"result link: {response.message}. please tell user to check it."
elif response.type == ToolInvokeMessage.MessageType.IMAGE_LINK or \
response.type == ToolInvokeMessage.MessageType.IMAGE:
- result += "image has been created and sent to user already, you should tell user to check it now."
+ result += "image has been created and sent to user already, you do not need to create it, just tell the user to check it now."
else:
result += f"tool response: {response.message}."
diff --git a/api/core/tools/tool/tool.py b/api/core/tools/tool/tool.py
index 351ae4362ef..103fb931c5c 100644
--- a/api/core/tools/tool/tool.py
+++ b/api/core/tools/tool/tool.py
@@ -232,7 +232,7 @@ class Tool(BaseModel, ABC):
result += f"result link: {response.message}. please tell user to check it."
elif response.type == ToolInvokeMessage.MessageType.IMAGE_LINK or \
response.type == ToolInvokeMessage.MessageType.IMAGE:
- result += "image has been created and sent to user already, you should tell user to check it now."
+ result += "image has been created and sent to user already, you do not need to create it, just tell the user to check it now."
elif response.type == ToolInvokeMessage.MessageType.BLOB:
if len(response.message) > 114:
result += str(response.message[:114]) + '...'