news 2026/3/14 13:48:53

用 Dify 工作流 + Coze 插件 Doubao-Seedream-4.0 做一个完整的工作流

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
用 Dify 工作流 + Coze 插件 Doubao-Seedream-4.0 做一个完整的工作流

摘要

本文介绍了一个基于Coze平台的完整工作流程,包含四个关键节点:1)通过触发器启动流程;2)使用Doubao-Seedream-4.0进行数据处理;3)利用LLM将结果转换为Markdown格式;4)最终输出结果。工作流支持图片/文本输入,通过OCR和内容优化处理后生成图文内容,最终以结构化Markdown格式呈现。文中提供了YAML配置文件示例,并强调合理设置触发器和统一输出格式的重要性,以提高自动化处理效率。

完整工作流

Start(上传图片 / 文本) ↓ LLM OCR + 文字优化 ↓ generateImage(Doubao-Seedream-4.0) ↓ LLM Markdown 文章生成 ↓ Answer(展示 Markdown)

在这个节点中,我们开始创建一个新的工作流。首先需要选择工作流的名称和描述,为整个流程设定一个清晰的目标。

提示:命名规范可以帮助团队更快理解工作流的用途。


第一步节点:配置触发器

配置触发器是工作流的关键步骤。触发器决定了何时启动工作流,例如新文件上传、定时任务或手动执行。

优化建议:合理选择触发器类型可以避免不必要的资源浪费。


第二步节点:添加处理逻辑

在此节点中,使用Doubao-Seedream-4.0处理数据,例如生成内容、分析信息或进行自动化操作。

提示:可以通过 Coze 插件增强节点的智能处理能力,提高效率。


第三步节点: LLM 处理成 markdown 格式

此节点负责将处理后的结果输出到指定位置,如数据库、文件系统或通知系统。

优化建议:确保输出格式统一,并根据需要选择合适的输出渠道。


第四步节点:结果输出

输出内复。

完整的 yaml (另存.yaml 导入)

app: description:''icon: 🤖 icon_background:'#FFEAD5'mode: advanced-chat name: Coze Text2Image Plugin Test use_icon_as_answer_icon:falsedependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/ollama:0.1.1@f3a8b649027d1bd13e67df96f3463a601c16628da4292705528d28d97d96b263 version: null kind: app version:0.5.0 workflow: conversation_variables:[]environment_variables:[]features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url enabled:falsefileUploadConfig: audio_file_size_limit:50batch_count_limit:5file_size_limit:15image_file_batch_limit:10image_file_size_limit:10single_chunk_attachment_limit:10video_file_size_limit:100workflow_file_upload_limit:10image: enabled:falsenumber_limits:3transfer_methods: - local_file - remote_url number_limits:3opening_statement:''retriever_resource: enabled:truesensitive_word_avoidance: enabled:falsespeech_to_text: enabled:falsesuggested_questions:[]suggested_questions_after_answer: enabled:falsetext_to_speech: enabled:falselanguage:''voice:''graph: edges: - data: isInLoop:falsesourceType: start targetType: llm id:1755656337314-source-1769495277758-target source:'1755656337314'sourceHandle:sourcetarget:'1769495277758'targetHandle: target type: custom zIndex:0- data: isInLoop:falsesourceType: llm targetType: tool id:1769495277758-source-1769480385192-target source:'1769495277758'sourceHandle:sourcetarget:'1769480385192'targetHandle: target type: custom zIndex:0- data: isInLoop:falsesourceType: tool targetType: llm id:1769480385192-source-1769496917956-target source:'1769480385192'sourceHandle:sourcetarget:'1769496917956'targetHandle: target type: custom zIndex:0- data: isInLoop:falsesourceType: llm targetType: answer id:1769496917956-source-1769495850925-target source:'1769496917956'sourceHandle:sourcetarget:'1769495850925'targetHandle: target type: custom zIndex:0nodes: - data: desc:''selected:truetitle: Start type: start variables:[]height:73id:'1755656337314'position: x:80y:282positionAbsolute: x:80y:282selected:truesourcePosition: right targetPosition: left type: custom width:242- data: context: enabled:falsevariable_selector:[]model: completion_params: temperature:0.7mode: chat name: qwen2.5 provider: langgenius/ollama/ollama prompt_template: - id: 5eab9d56-5a08-44d9-ae08-abf4db6a79b7 role: system text:'请从下面的{{#1769480385192.text#}}文本中提取出所有链接(以 http:// 或 https:// 开头), 然后将每个链接转换成 Markdown 图片格式显示: ![图片](链接)'selected:falsestructured_output_enabled:truetitle: LLM2type: llm vision: enabled:falseheight:88id:'1769496917956'position: x:827.3613552326078y: -45.29221663684261 positionAbsolute: x:827.3613552326078y: -45.29221663684261 selected:falsesourcePosition: right targetPosition: left type: custom width:242- data: is_team_authorization:trueparamSchemas: - auto_generate: null default: null form: llm human_description: en_US:1表示单图,2-10 表示生成一组相关联的图,最大支持10,数量越大速度越慢, default value is1ja_JP:1表示单图,2-10 表示生成一组相关联的图,最大支持10,数量越大速度越慢, default value is1pt_BR:1表示单图,2-10 表示生成一组相关联的图,最大支持10,数量越大速度越慢, default value is1zh_Hans:1表示单图,2-10 表示生成一组相关联的图,最大支持10,数量越大速度越慢, default value is1label: en_US: max_images ja_JP: max_images pt_BR: max_images zh_Hans: max_images llm_description:1表示单图,2-10 表示生成一组相关联的图,最大支持10,数量越大速度越慢, default value is1max: null min: null name: max_images options:[]placeholder: null precision: null required:falsescope: null template: null type: number - auto_generate: null default: null form: llm human_description: en_US: 用于生成图像的提示词,支持中英文。 建议不超过300个汉字或600个英文单词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成视图片缺失部分元素。 ja_JP: 用于生成图像的提示词,支持中英文。 建议不超过300个汉字或600个英文单词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成视图片缺失部分元素。 pt_BR: 用于生成图像的提示词,支持中英文。 建议不超过300个汉字或600个英文单词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成视图片缺失部分元素。 zh_Hans: 用于生成图像的提示词,支持中英文。 建议不超过300个汉字或600个英文单词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成视图片缺失部分元素。 label: en_US: prompt ja_JP: prompt pt_BR: prompt zh_Hans: prompt llm_description: 用于生成图像的提示词,支持中英文。 建议不超过300个汉字或600个英文单词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成视图片缺失部分元素。 max: null min: null name: prompt options:[]placeholder: null precision: null required:truescope: null template: null type: string - auto_generate: null default: null form: llm human_description: en_US: 参考图 ja_JP: 参考图 pt_BR: 参考图 zh_Hans: 参考图 input_schema: description: 参考图 items: type: string type: array label: en_US: reference_images ja_JP: reference_images pt_BR: reference_images zh_Hans: reference_images llm_description: 参考图 max: null min: null name: reference_images options:[]placeholder: null precision: null required:falsescope: null template: null type: array - auto_generate: null default: null form: llm human_description: en_US: 方式1:指定生成图像的分辨率,并在prompt中用自然语言描述图片宽高比、图片形状或图片用途,最终由模型判断生成图片的大小。 可选值:1K、2K、4K 方式2:指定生成图像的宽高像素值: 默认值:2048x2048 取值范围:[1024x1024, 4096x4096]ja_JP: 方式1:指定生成图像的分辨率,并在prompt中用自然语言描述图片宽高比、图片形状或图片用途,最终由模型判断生成图片的大小。 可选值:1K、2K、4K 方式2:指定生成图像的宽高像素值: 默认值:2048x2048 取值范围:[1024x1024, 4096x4096]pt_BR: 方式1:指定生成图像的分辨率,并在prompt中用自然语言描述图片宽高比、图片形状或图片用途,最终由模型判断生成图片的大小。 可选值:1K、2K、4K 方式2:指定生成图像的宽高像素值: 默认值:2048x2048 取值范围:[1024x1024, 4096x4096]zh_Hans: 方式1:指定生成图像的分辨率,并在prompt中用自然语言描述图片宽高比、图片形状或图片用途,最终由模型判断生成图片的大小。 可选值:1K、2K、4K 方式2:指定生成图像的宽高像素值: 默认值:2048x2048 取值范围:[1024x1024, 4096x4096]label: en_US: size ja_JP: size pt_BR: size zh_Hans: size llm_description: 方式1:指定生成图像的分辨率,并在prompt中用自然语言描述图片宽高比、图片形状或图片用途,最终由模型判断生成图片的大小。 可选值:1K、2K、4K 方式2:指定生成图像的宽高像素值: 默认值:2048x2048 取值范围:[1024x1024, 4096x4096]max: null min: null name: size options:[]placeholder: null precision: null required:falsescope: null template: null type: string - auto_generate: null default: null form: llm human_description: en_US: 是否在生成的图片中添加水印。, default value istrueja_JP: 是否在生成的图片中添加水印。, default value istruept_BR: 是否在生成的图片中添加水印。, default value istruezh_Hans: 是否在生成的图片中添加水印。, default value istruelabel: en_US: watermark ja_JP: watermark pt_BR: watermark zh_Hans: watermark llm_description: 是否在生成的图片中添加水印。, default value istruemax: null min: null name: watermark options:[]placeholder: null precision: null required:falsescope: null template: null type: boolean params: max_images:''prompt:''reference_images:''size:''watermark:''plugin_id:''plugin_unique_identifier:''provider_icon: background:'#FFEAD5'content: grinning provider_id:'7548380026094370867'provider_name: Doubao-Seedream-4.0 provider_type: mcp selected:falsetitle: generateImage tool_configurations:{}tool_description: 图像生成 tool_label: generateImage tool_name: generateImage tool_node_version:'2'tool_parameters: max_images: type: constant value:1prompt: type: mixed value:'{{#1769495277758.structured_output.final_prompt#}}'reference_images: type: constant value: null size: type: mixed value: 4K watermark: type: constant value:falsetype: tool height:84id:'1769480385192'position: x:563.2831793982236y:134.86430588045243positionAbsolute: x:563.2831793982236y:134.86430588045243selected:falsesourcePosition: right targetPosition: left type: custom width:242- data: context: enabled:truevariable_selector: - sys - query model: completion_params: temperature:0.7mode: chat name: qwen2.5 provider: langgenius/ollama/ollama prompt_template: - id: 66068b00-39af-4f8a-b867-f37778cfc044 role: system text:'你是电影概念设计师。 请将{{#sys.query#}}整理为适合图像生成的高质量提示词, 强调构图、光影、风格,不要输出解释说明。'selected:falsestructured_output: schema: additionalProperties:falseproperties: final_prompt: type: string required:[]type: object structured_output_enabled:truetitle: LLM type: llm vision: enabled:falseheight:88id:'1769495277758'position: x:350y:230.5positionAbsolute: x:350y:230.5selected:falsesourcePosition: right targetPosition: left type: custom width:242- data: answer:'{{#1769496917956.text#}}'selected:falsetitle: 直接回复 type: answer variables:[]height:103id:'1769495850925'position: x:1157.3912308238766y:26.85806320276197positionAbsolute: x:1157.3912308238766y:26.85806320276197selected:falsesourcePosition: right targetPosition: left type: custom width:242viewport: x:138.16956106507644y:224.18796478896266zoom:0.387152569163775rag_pipeline_variables:[]

图片生成工具请参考
Dify 结合 Coze MCP 工具实现智能图片生成:完整教程

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/3/12 20:41:33

误差反向传播法的实现:像搭乐高一样构建神经网络

误差反向传播法的实现:像搭乐高一样构建神经网络 在深度学习中,实现一个神经网络可以像组装乐高积木一样简单——通过组合已经实现好的各种层,我们可以构建出功能强大的模型。今天,我们将深入探讨如何通过这种方法实现神经网络&a…

作者头像 李华
网站建设 2026/3/11 9:03:34

企业OA系统安全防护全攻略:从基础加固到长效防御,十分钟构建坚不可摧的办公安全屏障

OA系统作为企业数字化办公的核心中枢,承载着员工信息、财务数据、业务流程、商业机密等关键资产,是企业生产经营的“神经中枢”。随着数字化办公的深度普及,OA系统已成为网络攻击的重点目标——从弱密码爆破、漏洞利用到钓鱼攻击、内部泄密&a…

作者头像 李华
网站建设 2026/3/11 13:23:01

数字取证之浏览器取证:技术体系、实操方法与实战要点

浏览器作为用户网络行为的核心载体,记录了访问轨迹、数据交互、账户信息、文件操作等全维度行为痕迹,是数字取证中电子数据固定与分析的核心环节,广泛应用于网络犯罪调查、民事纠纷取证、企业合规审计等场景。浏览器取证的核心目标是无篡改提…

作者头像 李华
网站建设 2026/3/10 17:33:00

MaaP:5G短消息的“心脏引擎”,政企招标暗藏的决胜密码!

作者:尘客首发:5G全域通每一条消息都是奇迹的发生。3.4亿!中国移动三期工程、3.27亿!中国电信全国升级——所有5G消息招标文件里,藏着同一个关键词: MaaP读懂它,中标率提升50%;忽略它…

作者头像 李华
网站建设 2026/3/13 14:52:16

专科生必备8个降AI率工具,高效避坑指南!

专科生必备8个降AI率工具,高效避坑指南! AI降重工具:专科生论文的“隐形助手” 在当前高校教育日益重视学术规范的大背景下,越来越多的专科生开始关注论文的AIGC率和查重率问题。尤其是随着AI写作工具的普及,许多学生…

作者头像 李华
网站建设 2026/3/12 3:16:35

【读书笔记】《光环效应》

《光环效应》读书笔记 核心观点 《光环效应》揭示了一个残酷的事实:过去许多奉为经典的商业书籍,其实都只是人们的主观总结和猜测,因为它们全部被"光环效应"所笼罩。 什么是光环效应? 经典案例:乐高 vs 711 乐高的…

作者头像 李华