mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 11:56:53 +08:00
fix: correct response hint for generated image to avoid illusion of regernerated image link (#2962)
This commit is contained in:
@@ -145,7 +145,7 @@ class BaseAssistantApplicationRunner(AppRunner):
|
|||||||
result += f"result link: {response.message}. please tell user to check it."
|
result += f"result link: {response.message}. please tell user to check it."
|
||||||
elif response.type == ToolInvokeMessage.MessageType.IMAGE_LINK or \
|
elif response.type == ToolInvokeMessage.MessageType.IMAGE_LINK or \
|
||||||
response.type == ToolInvokeMessage.MessageType.IMAGE:
|
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:
|
else:
|
||||||
result += f"tool response: {response.message}."
|
result += f"tool response: {response.message}."
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ class Tool(BaseModel, ABC):
|
|||||||
result += f"result link: {response.message}. please tell user to check it."
|
result += f"result link: {response.message}. please tell user to check it."
|
||||||
elif response.type == ToolInvokeMessage.MessageType.IMAGE_LINK or \
|
elif response.type == ToolInvokeMessage.MessageType.IMAGE_LINK or \
|
||||||
response.type == ToolInvokeMessage.MessageType.IMAGE:
|
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:
|
elif response.type == ToolInvokeMessage.MessageType.BLOB:
|
||||||
if len(response.message) > 114:
|
if len(response.message) > 114:
|
||||||
result += str(response.message[:114]) + '...'
|
result += str(response.message[:114]) + '...'
|
||||||
|
|||||||
Reference in New Issue
Block a user