800字以内不合成图片

This commit is contained in:
liuwei
2025-05-29 11:02:32 +08:00
parent 77dbe54f73
commit 217b06d58d

View File

@@ -154,7 +154,7 @@ class DifyPlugin(MessagePluginInterface):
await bot.send_image_message((roomid if roomid else sender), Path(response))
else:
# 如果是普通文本则在长度大于100字时转为图片发送
if len(response) > 400:
if len(response) > 800:
# 转图片
output_image = f"dify_output_{int(time.time())}.png"
respath = await convert_md_str_to_image(response, output_image)
@@ -221,7 +221,7 @@ class DifyPlugin(MessagePluginInterface):
await bot.send_image_message((roomid if roomid else sender), Path(response))
else:
# 如果是普通文本则在长度大于100字时转为图片发送
if len(response) > 400:
if len(response) > 800:
# 转图片
output_image = f"dify_output_{int(time.time())}.png"
respath = await convert_md_str_to_image(response, output_image)