搭建绘画工作流的教程如下,请先看完下面教程(小白保姆级教程)
教程简介
本教程可助你完全免费地搭建一个 集最先进的大语言模型与绘画模型于一身,可自行调用绘画工具,可文生图或图生图,可读取文档,带图片审核和道德审核,带语音输入,带语音播报的全能AI助手!可看成openwebui替代升级版。
不多说,直接上效果图:
工作流展示:
工作流导入,导入方法见顶部的教程:
{
"nodes": [
{
"nodeId": "userGuide",
"name": "功能配置",
"intro": "core.app.tip.userGuideTip",
"avatar": "core/workflow/template/systemConfig",
"flowNodeType": "userGuide",
"position": {
"x": 958.9123292181583,
"y": 1053.8060931703092
},
"version": "481",
"inputs": [
{
"key": "welcomeText",
"renderTypeList": [
"hidden"
],
"valueType": "string",
"label": "core.app.Welcome Text",
"type": "hidden",
"showTargetInApp": false,
"showTargetInPlugin": false,
"value": "您好,我是stable-diffusion文生图像绘制助手,您可以按照下面这个格式进行提问:\n[一只赛博朋克猫咪]\n[一只黑白相间的狗在追蝴蝶]",
"connected": false,
"selectedTypeIndex": 0
},
{
"key": "variables",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"label": "core.module.Variable",
"value": [
{
"id": "6agumx",
"key": "AI优化",
"label": "是否需要使用AI优化提示词?(默认不需要)",
"type": "select",
"required": false,
"maxLen": 50,
"enums": [
{
"value": "true"
},
{
"value": "false"
}
],
"icon": "core/app/variable/select"
}
],
"type": "hidden",
"showTargetInApp": false,
"showTargetInPlugin": false,
"connected": false,
"selectedTypeIndex": 0
},
{
"key": "questionGuide",
"valueType": "boolean",
"renderTypeList": [
"hidden"
],
"label": "",
"type": "switch",
"showTargetInApp": false,
"showTargetInPlugin": false,
"connected": false,
"selectedTypeIndex": 0
},
{
"key": "tts",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"label": "",
"type": "hidden",
"showTargetInApp": false,
"showTargetInPlugin": false,
"connected": false,
"selectedTypeIndex": 0
},
{
"key": "whisper",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"label": "",
"type": "hidden",
"showTargetInApp": false,
"showTargetInPlugin": false,
"connected": false,
"selectedTypeIndex": 0
},
{
"key": "scheduleTrigger",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"label": "",
"value": null
}
],
"outputs": []
},
{
"nodeId": "userChatInput",
"name": "流程开始",
"intro": "当用户发送一个内容后,流程将会从这个模块开始执行。",
"avatar": "core/workflow/template/workflowStart",
"flowNodeType": "workflowStart",
"position": {
"x": 567.0092912447614,
"y": 1169.4727598369757
},
"version": "481",
"inputs": [
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "问题输入",
"required": true,
"toolDescription": "用户问题",
"type": "systemInput",
"showTargetInApp": false,
"showTargetInPlugin": false,
"connected": false,
"selectedTypeIndex": 0,
"value": [
"userChatInput",
"userChatInput"
],
"debugLabel": ""
}
],
"outputs": [
{
"id": "userChatInput",
"key": "userChatInput",
"label": "common:core.module.input.label.user question",
"type": "static",
"valueType": "string",
"description": ""
},
{
"id": "userFiles",
"key": "userFiles",
"label": "app:workflow.user_file_input",
"description": "app:workflow.user_file_input_desc",
"type": "static",
"valueType": "arrayString"
}
]
},
{
"nodeId": "szqvHMArA7rG",
"name": "FLUX.1",
"intro": "可以发出一个 HTTP 请求,实现更为复杂的操作(联网搜索、数据库查询等)",
"avatar": "core/workflow/template/httpRequest",
"flowNodeType": "httpRequest468",
"showStatus": true,
"position": {
"x": 1993.489566679038,
"y": 1212.3060931703092
},
"version": "481",
"inputs": [
{
"key": "system_addInputParam",
"renderTypeList": [
"addInputParam"
],
"valueType": "dynamic",
"label": "",
"required": false,
"description": "common:core.module.input.description.HTTP Dynamic Input",
"editField": {
"key": true,
"valueType": true
},
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
},
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpMethod",
"renderTypeList": [
"custom"
],
"valueType": "string",
"label": "",
"value": "POST",
"required": true,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpTimeout",
"renderTypeList": [
"custom"
],
"valueType": "number",
"label": "",
"value": 30,
"min": 5,
"max": 600,
"required": true,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpReqUrl",
"renderTypeList": [
"hidden"
],
"valueType": "string",
"label": "",
"description": "common:core.module.input.description.Http Request Url",
"placeholder": "https://api.ai.com/getInventory",
"required": false,
"value": "https://api.siliconflow.cn/v1/image/generations",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpHeader",
"renderTypeList": [
"custom"
],
"valueType": "any",
"value": [
{
"key": "content-type",
"type": "string",
"value": "application/json"
},
{
"key": "authorization",
"type": "string",
"value": "Bearer sk-xxxxxx填入密钥"
}
],
"label": "",
"description": "common:core.module.input.description.Http Request Header",
"placeholder": "common:core.module.input.description.Http Request Header",
"required": false,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpParams",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"value": [],
"label": "",
"required": false,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpJsonBody",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"value": "{\r\n \"model\": \"Pro/black-forest-labs/FLUX.1-schnell\",\r\n \"prompt\": \"{{prompt}}\",\r\n \"image_size\": \"1024x1024\",\r\n \"num_inference_steps\": 20\r\n}",
"label": "",
"required": false,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpFormBody",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"value": [],
"label": "",
"required": false,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_httpContentType",
"renderTypeList": [
"hidden"
],
"valueType": "string",
"value": "json",
"label": "",
"required": false,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "prompt",
"valueType": "string",
"label": "prompt",
"renderTypeList": [
"reference"
],
"description": "",
"canEdit": true,
"editField": {
"key": true,
"valueType": true
},
"value": [
"v0wFQcMn66ND",
"answerText"
],
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": true
}
}
],
"outputs": [
{
"id": "error",
"key": "error",
"label": "workflow:request_error",
"description": "HTTP请求错误信息,成功时返回空",
"valueType": "object",
"type": "static"
},
{
"id": "httpRawResponse",
"key": "httpRawResponse",
"required": true,
"label": "workflow:raw_response",
"description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
"valueType": "any",
"type": "static"
},
{
"id": "system_addOutputParam",
"key": "system_addOutputParam",
"type": "dynamic",
"valueType": "dynamic",
"label": "",
"editField": {
"key": true,
"valueType": true
}
},
{
"id": "q2mkKEFTiGJV",
"type": "dynamic",
"key": "images[0].url",
"valueType": "string",
"label": "images[0].url"
}
]
},
{
"nodeId": "vFlAtLTLYxl7",
"name": "文本拼接",
"intro": "可对固定或传入的文本进行加工后输出,非字符串类型数据最终会转成字符串类型。",
"avatar": "core/workflow/template/textConcat",
"flowNodeType": "textEditor",
"position": {
"x": 3366.8024889168055,
"y": 1317.5589441667812
},
"version": "486",
"inputs": [
{
"key": "system_addInputParam",
"renderTypeList": [
"addInputParam"
],
"valueType": "dynamic",
"label": "",
"required": false,
"description": "workflow:dynamic_input_description_concat",
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": false
},
"debugLabel": "",
"toolDescription": ""
},
{
"key": "system_textareaInput",
"renderTypeList": [
"textarea"
],
"valueType": "string",
"required": true,
"label": "拼接文本",
"placeholder": "workflow:input_variable_list",
"value": "![ai]({{url}})",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"reference"
],
"valueType": "string",
"canEdit": true,
"key": "url",
"label": "url",
"customInputConfig": {
"selectValueTypeList": [
"string",
"number",
"boolean",
"object",
"arrayString",
"arrayNumber",
"arrayBoolean",
"arrayObject",
"arrayAny",
"any",
"chatHistory",
"datasetQuote",
"dynamic",
"selectApp",
"selectDataset"
],
"showDescription": false,
"showDefaultValue": false
},
"required": true,
"value": [
"szqvHMArA7rG",
"q2mkKEFTiGJV"
]
}
],
"outputs": [
{
"id": "system_text",
"key": "system_text",
"label": "workflow:concatenation_result",
"type": "static",
"valueType": "string",
"description": ""
}
]
},
{
"nodeId": "e6s2QseLaH23",
"name": "图片结果",
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
"avatar": "core/workflow/template/reply",
"flowNodeType": "answerNode",
"position": {
"x": 2874.159099825929,
"y": 1859.9727598369761
},
"version": "481",
"inputs": [
{
"key": "text",
"renderTypeList": [
"textarea",
"reference"
],
"valueType": "any",
"required": true,
"label": "core.module.input.label.Response content",
"description": "common:core.module.input.description.Response content",
"placeholder": "common:core.module.input.description.Response content",
"selectedTypeIndex": 1,
"value": [
"vFlAtLTLYxl7",
"system_text"
],
"debugLabel": "",
"toolDescription": ""
}
],
"outputs": []
},
{
"nodeId": "v0wFQcMn66ND",
"name": "AI 生成提示词",
"intro": "AI 大模型对话",
"avatar": "core/workflow/template/aiChat",
"flowNodeType": "chatNode",
"showStatus": true,
"position": {
"x": 1339.8764861140876,
"y": 1053.8060931703092
},
"version": "481",
"inputs": [
{
"key": "model",
"renderTypeList": [
"settingLLMModel",
"reference"
],
"label": "core.module.input.label.aiModel",
"valueType": "string",
"value": "gpt-4o-mini",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "temperature",
"renderTypeList": [
"hidden"
],
"label": "",
"value": 2,
"valueType": "number",
"min": 0,
"max": 10,
"step": 1,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "maxToken",
"renderTypeList": [
"hidden"
],
"label": "",
"value": 8000,
"valueType": "number",
"min": 100,
"max": 4000,
"step": 50,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "isResponseAnswerText",
"renderTypeList": [
"hidden"
],
"label": "",
"value": false,
"valueType": "boolean",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "aiChatQuoteRole",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"value": "system",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteTemplate",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quotePrompt",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "aiChatVision",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "boolean",
"value": true,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "systemPrompt",
"renderTypeList": [
"textarea",
"reference"
],
"max": 3000,
"valueType": "string",
"label": "core.ai.Prompt",
"description": "core.app.tip.systemPromptTip",
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
"value": "你是一个基于Flux.1模型的提示词生成机器人。根据用户的需求,自动生成符合Flux.1格式的绘画提示词。虽然你可以参考提供的模板来学习提示词结构和规律,但你必须具备灵活性来应对各种不同需求。最终输出应仅限提示词,无需任何其他解释或信息。你的回答必须全部使用英语进行回复我!\n\n### **提示词生成逻辑**:\n\n1. **需求解析**:从用户的描述中提取关键信息,包括:\n - 角色:外貌、动作、表情等。\n - 场景:环境、光线、天气等。\n - 风格:艺术风格、情感氛围、配色等。\n - 其他元素:特定物品、背景或特效。\n\n2. **提示词结构规律**:\n - **简洁、精确且具象**:提示词需要简单、清晰地描述核心对象,并包含足够细节以引导生成出符合需求的图像。\n - **灵活多样**:参考下列模板和已有示例,但需根据具体需求生成多样化的提示词,避免固定化或过于依赖模板。\n - **符合Flux.1风格的描述**:提示词必须遵循Flux.1的要求,尽量包含艺术风格、视觉效果、情感氛围的描述,使用与Flux.1模型生成相符的关键词和描述模式。\n\n3. **仅供你参考和学习的几种场景提示词**(你需要学习并灵活调整,\"[ ]\"中内容视用户问题而定):\n - **角色表情集**:\n场景说明:适合动画或漫画创作者为角色设计多样的表情。这些提示词可以生成展示同一角色在不同情绪下的表情集,涵盖快乐、悲伤、愤怒等多种情感。\n\n提示词:An anime [SUBJECT], animated expression reference sheet, character design, reference sheet, turnaround, lofi style, soft colors, gentle natural linework, key art, range of emotions, happy sad mad scared nervous embarrassed confused neutral, hand drawn, award winning anime, fully clothed\n\n[SUBJECT] character, animation expression reference sheet with several good animation expressions featuring the same character in each one, showing different faces from the same person in a grid pattern: happy sad mad scared nervous embarrassed confused neutral, super minimalist cartoon style flat muted kawaii pastel color palette, soft dreamy backgrounds, cute round character designs, minimalist facial features, retro-futuristic elements, kawaii style, space themes, gentle line work, slightly muted tones, simple geometric shapes, subtle gradients, oversized clothing on characters, whimsical, soft puffy art, pastels, watercolor\n\n - **全角度角色视图**:\n场景说明:当需要从现有角色设计中生成不同角度的全身图时,如正面、侧面和背面,适用于角色设计细化或动画建模。\n\n提示词:A character sheet of [SUBJECT] in different poses and angles, including front view, side view, and back view\n\n - **80 年代复古风格**:\n场景说明:适合希望创造 80 年代复古风格照片效果的艺术家或设计师。这些提示词可以生成带有怀旧感的模糊宝丽来风格照片。\n\n提示词:blurry polaroid of [a simple description of the scene], 1980s.\n\n - **智能手机内部展示**:\n场景说明:适合需要展示智能手机等产品设计的科技博客作者或产品设计师。这些提示词帮助生成展示手机外观和屏幕内容的图像。\n\n提示词:a iphone product image showing the iphone standing and inside the screen the image is shown\n\n - **双重曝光效果**:\n场景说明:适合摄影师或视觉艺术家通过双重曝光技术创造深度和情感表达的艺术作品。\n\n提示词:[Abstract style waterfalls, wildlife] inside the silhouette of a [man]’s head that is a double exposure photograph . Non-representational, colors and shapes, expression of feelings, imaginative, highly detailed\n\n - **高质感电影海报**:\n场景说明:适合需要为电影创建引人注目海报的电影宣传或平面设计师。\n\n提示词:A digital illustration of a movie poster titled [‘Sad Sax: Fury Toad’], [Mad Max] parody poster, featuring [a saxophone-playing toad in a post-apocalyptic desert, with a customized car made of musical instruments], in the background, [a wasteland with other musical vehicle chases], movie title in [a gritty, bold font, dusty and intense color palette].\n\n - **镜面自拍效果**:\n场景说明:适合想要捕捉日常生活瞬间的摄影师或社交媒体用户。\n\n提示词:Phone photo: A woman stands in front of a mirror, capturing a selfie. The image quality is grainy, with a slight blur softening the details. The lighting is dim, casting shadows that obscure her features. [The room is cluttered, with clothes strewn across the bed and an unmade blanket. Her expression is casual, full of concentration], while the old iPhone struggles to focus, giving the photo an authentic, unpolished feel. The mirror shows smudges and fingerprints, adding to the raw, everyday atmosphere of the scene.\n\n - **像素艺术创作**:\n场景说明:适合像素艺术爱好者或复古游戏开发者创造或复刻经典像素风格图像。\n\n提示词:[Anything you want] pixel art style, pixels, pixel art\n\n - **以上部分场景仅供你学习,一定要学会灵活变通,以适应任何绘画需求**:\n\n4. **Flux.1提示词要点总结**:\n - **简洁精准的主体描述**:明确图像中核心对象的身份或场景。\n - **风格和情感氛围的具体描述**:确保提示词包含艺术风格、光线、配色、以及图像的氛围等信息。\n - **动态与细节的补充**:提示词可包括场景中的动作、情绪、或光影效果等重要细节。\n - **其他更多规律请自己寻找**\n---\n\n**问答案例**:\n**用户输入**:一个80年代复古风格的照片。\n**你的输出**:`A blurry polaroid of a 1980s living room, with vintage furniture, soft pastel tones, and a nostalgic, grainy texture, The sunlight filters through old curtains, casting long, warm shadows on the wooden floor, 1980s,`\n\n**问答案例2**:\n**用户输入**:一个赛博朋克风格的夜晚城市背景。\n**你的输出**:`A futuristic cityscape at night, in a cyberpunk style, with neon lights reflecting off wet streets, towering skyscrapers, and a glowing, high-tech atmosphere. Dark shadows contrast with vibrant neon signs, creating a dramatic, dystopian mood.`\n\n注意:你的生成内容绝对不允许含有“![ai](任意链接)”。哪怕你之前不小心含有“![ai](任意链接)”内容,请在下一次绝对不允许含有“![ai](任意链接)”内容。\n\n(注意:你不得生成任何色情,猎奇相关的提示词,提示词务必绿色健康。)",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "core.module.input.label.chat history",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 0,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteQA",
"renderTypeList": [
"settingDatasetQuotePrompt"
],
"label": "",
"debugLabel": "知识库引用",
"description": "",
"valueType": "datasetQuote",
"toolDescription": ""
},
{
"key": "stringQuoteText",
"renderTypeList": [
"reference",
"textarea"
],
"label": "app:document_quote",
"debugLabel": "文档引用",
"description": "app:document_quote_tip",
"valueType": "string",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"required": true,
"toolDescription": "用户问题",
"value": [
"userChatInput",
"userChatInput"
],
"debugLabel": ""
}
],
"outputs": [
{
"id": "history",
"key": "history",
"required": true,
"label": "common:core.module.output.label.New context",
"description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
"valueType": "chatHistory",
"valueDesc": "{\n obj: System | Human | AI;\n value: string;\n}[]",
"type": "static"
},
{
"id": "answerText",
"key": "answerText",
"required": true,
"label": "common:core.module.output.label.Ai response content",
"description": "将在 stream 回复完毕后触发",
"valueType": "string",
"type": "static"
}
]
},
{
"nodeId": "zc7ktry3f72b",
"name": "判断器",
"intro": "根据一定的条件,执行不同的分支。",
"avatar": "core/workflow/template/ifelse",
"flowNodeType": "ifElseNode",
"showStatus": true,
"position": {
"x": 2626.162028829455,
"y": 1412.3060931703092
},
"version": "481",
"inputs": [
{
"key": "ifElseList",
"renderTypeList": [
"hidden"
],
"valueType": "any",
"label": "",
"value": [
{
"condition": "AND",
"list": [
{
"variable": [
"szqvHMArA7rG",
"q2mkKEFTiGJV"
],
"condition": "isNotEmpty"
}
]
}
],
"debugLabel": "",
"toolDescription": ""
}
],
"outputs": [
{
"id": "ifElseResult",
"key": "ifElseResult",
"label": "workflow:judgment_result",
"valueType": "string",
"type": "static",
"description": ""
}
]
},
{
"nodeId": "jLw88HwzM9k1",
"name": "未通过图片审核",
"intro": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
"avatar": "core/workflow/template/reply",
"flowNodeType": "answerNode",
"position": {
"x": 2874.159099825929,
"y": 2095.482154864095
},
"version": "481",
"inputs": [
{
"key": "text",
"renderTypeList": [
"textarea",
"reference"
],
"valueType": "any",
"required": true,
"label": "common:core.module.input.label.Response content",
"description": "common:core.module.input.description.Response content",
"placeholder": "common:core.module.input.description.Response content",
"value": "警告:生成的图片疑似含有非绿色内容!",
"debugLabel": "",
"toolDescription": ""
}
],
"outputs": []
},
{
"nodeId": "oT5WNebM84eP",
"name": "正在判断是否调用绘画功能",
"intro": "根据用户的历史记录和当前问题判断该次提问的类型。可以添加多组问题类型,下面是一个模板例子:\n类型1: 打招呼\n类型2: 关于商品“使用”问题\n类型3: 关于商品“购买”问题\n类型4: 其他问题",
"avatar": "core/workflow/template/questionClassify",
"flowNodeType": "classifyQuestion",
"showStatus": true,
"position": {
"x": 671.4873605212157,
"y": 1734.4502889370647
},
"version": "481",
"inputs": [
{
"key": "model",
"renderTypeList": [
"selectLLMModel",
"reference"
],
"label": "AI 模型",
"required": true,
"valueType": "string",
"llmModelType": "classify",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": "",
"value": "gpt-4o-mini"
},
{
"key": "systemPrompt",
"renderTypeList": [
"textarea",
"reference"
],
"max": 3000,
"valueType": "string",
"label": "背景知识",
"description": "core.module.input.description.Background",
"placeholder": "core.module.input.placeholder.Classify background",
"valueDesc": "",
"debugLabel": "",
"toolDescription": "",
"value": "你是一个全能助手,在此情景中,你可以调用绘画工具。"
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "聊天记录",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 2,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "用户输入的问题(问题需要完善)",
"required": true,
"value": [
"userChatInput",
"userChatInput"
],
"valueDesc": "",
"description": "",
"debugLabel": ""
},
{
"renderTypeList": [
"custom"
],
"valueType": "any",
"label": "",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": "",
"key": "agents",
"value": [
{
"value": "用户需要你画一张画",
"key": "wqre"
},
{
"value": "用户正常问问题,不需要绘画功能",
"key": "sdfa"
}
]
}
],
"outputs": [
{
"id": "cqResult",
"key": "cqResult",
"required": true,
"label": "workflow:classification_result",
"valueType": "string",
"type": "static",
"description": ""
}
]
},
{
"nodeId": "y3h7oP43Y2Oj",
"name": "全能助手",
"intro": "AI 大模型对话",
"avatar": "core/workflow/template/aiChat",
"flowNodeType": "chatNode",
"showStatus": true,
"position": {
"x": 1993.489566679038,
"y": 1999.9919123679229
},
"version": "481",
"inputs": [
{
"key": "model",
"renderTypeList": [
"settingLLMModel",
"reference"
],
"label": "core.module.input.label.aiModel",
"valueType": "string",
"value": "glm-4-flash",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "temperature",
"renderTypeList": [
"hidden"
],
"label": "",
"value": 2,
"valueType": "number",
"min": 0,
"max": 10,
"step": 1,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "maxToken",
"renderTypeList": [
"hidden"
],
"label": "",
"value": 2000,
"valueType": "number",
"min": 100,
"max": 4000,
"step": 50,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "isResponseAnswerText",
"renderTypeList": [
"hidden"
],
"label": "",
"value": true,
"valueType": "boolean",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "aiChatQuoteRole",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"value": "system",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteTemplate",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quotePrompt",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "aiChatVision",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "boolean",
"value": true,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "systemPrompt",
"renderTypeList": [
"textarea",
"reference"
],
"max": 3000,
"valueType": "string",
"label": "core.ai.Prompt",
"description": "core.app.tip.systemPromptTip",
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
"value": "你是一个全能专家。",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "core.module.input.label.chat history",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 6,
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteQA",
"renderTypeList": [
"settingDatasetQuotePrompt"
],
"label": "",
"debugLabel": "知识库引用",
"description": "",
"valueType": "datasetQuote",
"toolDescription": ""
},
{
"key": "stringQuoteText",
"renderTypeList": [
"reference",
"textarea"
],
"label": "app:document_quote",
"debugLabel": "文档引用",
"description": "app:document_quote_tip",
"valueType": "string",
"toolDescription": "",
"selectedTypeIndex": 0,
"value": [
"b6LGdq7IS9KX",
"system_text"
]
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"required": true,
"toolDescription": "用户问题",
"value": [
"userChatInput",
"userChatInput"
],
"debugLabel": ""
}
],
"outputs": [
{
"id": "history",
"key": "history",
"required": true,
"label": "common:core.module.output.label.New context",
"description": "将本次回复内容拼接上历史记录,作为新的上下文返回",
"valueType": "chatHistory",
"valueDesc": "{\n obj: System | Human | AI;\n value: string;\n}[]",
"type": "static"
},
{
"id": "answerText",
"key": "answerText",
"required": true,
"label": "common:core.module.output.label.Ai response content",
"description": "将在 stream 回复完毕后触发",
"valueType": "string",
"type": "static"
}
]
},
{
"nodeId": "b6LGdq7IS9KX",
"name": "文档解析",
"intro": "解析对话中所有上传的文档,并返回对应文档内容",
"avatar": "core/workflow/template/readFiles",
"flowNodeType": "readFiles",
"showStatus": true,
"position": {
"x": 1364.127951178254,
"y": 2280.991912367923
},
"version": "489",
"inputs": [
{
"key": "fileUrlList",
"renderTypeList": [
"reference"
],
"valueType": "arrayString",
"label": "文档链接",
"required": true,
"value": [
"userChatInput",
"userFiles"
],
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
}
],
"outputs": [
{
"id": "system_text",
"key": "system_text",
"label": "app:workflow.read_files_result",
"description": "文档原文,由文件名和文档内容组成,多个文件之间通过横线隔开。",
"valueType": "string",
"type": "static"
}
]
}
],
"edges": [
{
"source": "vFlAtLTLYxl7",
"target": "e6s2QseLaH23",
"sourceHandle": "vFlAtLTLYxl7-source-right",
"targetHandle": "e6s2QseLaH23-target-left"
},
{
"source": "szqvHMArA7rG",
"target": "zc7ktry3f72b",
"sourceHandle": "szqvHMArA7rG-source-right",
"targetHandle": "zc7ktry3f72b-target-left"
},
{
"source": "zc7ktry3f72b",
"target": "vFlAtLTLYxl7",
"sourceHandle": "zc7ktry3f72b-source-IF",
"targetHandle": "vFlAtLTLYxl7-target-left"
},
{
"source": "zc7ktry3f72b",
"target": "jLw88HwzM9k1",
"sourceHandle": "zc7ktry3f72b-source-ELSE",
"targetHandle": "jLw88HwzM9k1-target-left"
},
{
"source": "v0wFQcMn66ND",
"target": "szqvHMArA7rG",
"sourceHandle": "v0wFQcMn66ND-source-right",
"targetHandle": "szqvHMArA7rG-target-left"
},
{
"source": "userChatInput",
"target": "oT5WNebM84eP",
"sourceHandle": "userChatInput-source-right",
"targetHandle": "oT5WNebM84eP-target-left"
},
{
"source": "oT5WNebM84eP",
"target": "v0wFQcMn66ND",
"sourceHandle": "oT5WNebM84eP-source-wqre",
"targetHandle": "v0wFQcMn66ND-target-left"
},
{
"source": "oT5WNebM84eP",
"target": "b6LGdq7IS9KX",
"sourceHandle": "oT5WNebM84eP-source-sdfa",
"targetHandle": "b6LGdq7IS9KX-target-left"
},
{
"source": "b6LGdq7IS9KX",
"target": "y3h7oP43Y2Oj",
"sourceHandle": "b6LGdq7IS9KX-source-right",
"targetHandle": "y3h7oP43Y2Oj-target-left"
}
],
"chatConfig": {
"welcomeText": "您好!\n我是集世界最先进的大语言模型与绘画模型于一身的小羊智能",
"variables": [],
"whisperConfig": {
"open": true,
"autoSend": false,
"autoTTSResponse": false
},
"scheduledTriggerConfig": {
"cronString": "",
"timezone": "Asia/Shanghai",
"defaultPrompt": ""
},
"fileSelectConfig": {
"canSelectFile": true,
"canSelectImg": true,
"maxFiles": 10
},
"_id": "66c4a5e9501b65de6749f604"
}
}
快速使用
填入密钥硅基流动的密钥,选择好配置好的模型即可食用
接下来就可以直接发布成网页使用:
细节讲解:
集成先进的模型绘画
硅基流动提供永久免费的flux绘画,教程见:
集成先进的大语言模型
Fastgpt可接入NEW API或者ONE API,从而使用各种模型。
有佬友会问:你这工作流用的模型都不咋先进呀?
非也非也,Fastgpt只支持部分模型名字,因此在记得NEW API或者ONE API渠道里使用模型重定向,从而使用自己想用的模型。
例如我的配置如下:
模型能力见 LiveBench
读取文档,读取图片,语音输入,语音播报:
配置项如下,我发的工作流已配置好:
注意:如想读取图片,使用图生图功能,需要接入带视觉能力的模型
这里推荐使用 Google AI Studio接入NEW API或者ONE API,接入很方便,不作讲解。可多创建几个谷歌账号,实现 "gemini-1.5-pro-002"模型负载均衡。
图片审核和文本内容道德审核功能
Google AI Studio的大语言模型和硅基流动的绘画模型都有较为严格的审核,但并不妨碍正常使用。