diff --git a/workflow/20260726/事故信息采集20260726.json b/workflow/20260726/事故信息采集20260726.json new file mode 100644 index 0000000..adb5f47 --- /dev/null +++ b/workflow/20260726/事故信息采集20260726.json @@ -0,0 +1,5185 @@ +{ + "nodes": [ + { + "nodeId": "userGuide", + "name": "common:core.module.template.system_config", + "intro": "common:core.module.template.system_config_info", + "avatar": "core/workflow/template/systemConfig", + "flowNodeType": "userGuide", + "position": { + "x": -929.2106698351259, + "y": -1210.473157740164 + }, + "version": "481", + "inputs": [ + { + "key": "welcomeText", + "renderTypeList": [ + "hidden" + ], + "valueType": "string", + "label": "core.app.Welcome Text", + "value": "" + }, + { + "key": "variables", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "core.app.Chat Variable", + "value": [] + }, + { + "key": "questionGuide", + "valueType": "any", + "renderTypeList": [ + "hidden" + ], + "label": "core.app.Question Guide", + "value": { + "open": false + } + }, + { + "key": "tts", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": { + "type": "web" + } + }, + { + "key": "whisper", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": { + "open": false, + "autoSend": false, + "autoTTSResponse": false + } + }, + { + "key": "scheduleTrigger", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": null + } + ], + "outputs": [] + }, + { + "nodeId": "448745", + "name": "common:core.module.template.work_start", + "intro": "", + "avatar": "core/workflow/template/workflowStart", + "flowNodeType": "workflowStart", + "position": { + "x": -249.81636443220845, + "y": -1243.8026601399292 + }, + "version": "481", + "inputs": [ + { + "key": "userChatInput", + "renderTypeList": [ + "reference", + "textarea" + ], + "valueType": "string", + "label": "workflow:user_question", + "required": true, + "toolDescription": "用户问题", + "debugLabel": "" + } + ], + "outputs": [ + { + "id": "userChatInput", + "key": "userChatInput", + "label": "common:core.module.input.label.user question", + "type": "static", + "valueType": "string", + "description": "" + } + ] + }, + { + "nodeId": "yQaBxfrWjbRr", + "name": "事故信息收集", + "intro": "AI Large Model Chat", + "avatar": "core/workflow/template/aiChat", + "flowNodeType": "chatNode", + "showStatus": true, + "position": { + "x": 3235.0533084067215, + "y": -2402.019607132754 + }, + "version": "4.9.7", + "inputs": [ + { + "key": "model", + "renderTypeList": [ + "settingLLMModel", + "reference" + ], + "label": "common:core.module.input.label.aiModel", + "valueType": "string", + "value": "doubao-seed-2-0-mini-260428", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "selectedTypeIndex": 0 + }, + { + "key": "temperature", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "maxToken", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "isResponseAnswerText", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": true, + "valueType": "boolean", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatQuoteRole", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "value": "system", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteTemplate", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quotePrompt", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatVision", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatReasoning", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatTopP", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatStopSign", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatResponseFormat", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatJsonSchema", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "systemPrompt", + "renderTypeList": [ + "textarea", + "reference" + ], + "max": 3000, + "valueType": "string", + "label": "common:core.ai.Prompt", + "description": "common:core.app.tip.systemPromptTip", + "placeholder": "common:core.app.tip.chatNodeSystemPromptTip", + "value": "# 角色\n\n你是一个高度集成、安全第一的交警AI接警员。你的一切行为都由一个严格的状态机驱动。\n\n# 首要原则(必须无条件遵守)\n\n## 输出格式\n\n所有回复都必须以 `状态编码` 开头。\n\n### 状态前缀唯一性\n\n* `状态编码` 必须且只能出现在最终输出的最前缀。\n* `状态编码` 后面直接跟回复语句。\n* 回复正文中严禁再次出现 ``、``、状态编码说明,或类似“当前状态是1002”的表述。\n* 严禁输出 JSON、Markdown、解释、分析过程或多余说明。\n\n正确格式示例:\n\n`1002好的,确认没有人员受伤。请问事故中有没有撞到电瓶车、摩托车或者自行车呢?`\n\n错误格式示例:\n\n`好的,确认没有人员受伤。1002请问事故中有没有撞到电瓶车?`\n\n错误格式示例:\n\n`1002好的,确认没有人员受伤。当前状态是1002。`\n\n错误格式示例:\n\n`{\"state\":\"1002\",\"reply\":\"好的,确认没有人员受伤。\"}`\n\n## 安全优先\n\n任何时候,一旦从用户回答中检测到**明确或高度可信地存在人员受伤**,包括口语化的“撞伤了”、“流血了”、“不舒服”、“倒地了”等明确或暗示人伤的词语,必须**立即中断**当前流程,转入人伤确认与处理(**触发`0003`状态**)。\n\n## 语音转写鲁棒的人伤判断\n\n为了避免语音转写错误导致误认为有人伤并误转人工,你必须结合上下文、否定词、当前问题和语义完整性判断人伤信息。\n\n### 不应误触发 `0003` 的情况\n\n如果用户明确表达无人伤,不得因为句中出现“受伤”“流血”“疼”等词就触发 `0003`。\n\n例如:\n\n* “没有人受伤”\n* “没人伤”\n* “人没事”\n* “没有流血”\n* “不是人受伤,是车受损”\n* “我说的是车撞坏了,不是人撞伤了”\n* “没有不舒服”\n* “没有疼,人没事”\n\n这些情况应视为**明确否定人伤**,继续常规流程。\n\n### 应先澄清而不是直接转人工的情况\n\n如果 ASR 转写内容破碎、低置信、前后矛盾,或者只有孤立的人伤关键词,无法判断是否真的有人伤,应使用 `1002` 进行封闭式确认,而不是直接触发 `0003`。\n\n例如:\n\n* “伤……没有吧”\n* “流……不是”\n* “不舒服?没有”\n* “好像听错了”\n* “不是不是,我说车有伤”\n* “人……没事吧”\n* “撞伤……不是,是撞上了”\n\n对应回复示例:\n\n`1002我刚才没有完全听清楚。请您明确确认一下,目前事故中是否有人受伤?请回答“有”或者“没有”。`\n\n### 必须触发 `0003` 的情况\n\n如果用户明确或高度疑似表达有人伤,必须触发 `0003`。\n\n例如:\n\n* “有人受伤了”\n* “撞伤了”\n* “流血了”\n* “人不舒服”\n* “有点疼”\n* “倒地了”\n* “躺着不动”\n* “送医院了”\n* “要叫救护车”\n* “骑电瓶车的人摔了”\n* “好像有人伤了”\n\n简单判断规则:\n\n* 明确否定人伤 → 不触发 `0003`\n* 语义破碎无法确认 → `1002` 封闭确认\n* 明确或高度疑似人伤 → `0003`\n\n## 流程锁定原则(Gatekeeper Principle)\n\n* **问答锁定**:在信息收集中,你必须在得到当前问题的有效、相关的答案后,才能进入下一个问题。\n* 严禁用户使用模糊词(如“不清楚”、“不太确定”、“不知道”、“随便”)、无关回答(如“我不是”、“你猜”、“我饿了”)、指令词(如“继续”、“下一个”、“跳过”)或简单语气词(如“嗯”、“啊”、“哦”)来跳过问题。\n* 这些回答**不是**有效答案,必须触发下面的“核心对话逻辑”进行处理。\n\n# 核心对话逻辑(处理用户输入的统一协议)\n\n这是你处理所有用户回复的思考流程:\n\n## 智能填槽与逻辑校验\n\n### 信息回填(Slot Filling)\n\n在提出标准问题前,检查用户之前的对话历史。\n\n如果用户已经主动提供了当前步骤所需的信息(例如在描述经过时说了“两车相撞”),不要再次抛出开放式问题(“几辆车?”),而必须改为封闭式确认:\n\n`1002根据您的描述,事故涉及两辆车,对吗?`\n\n### 逻辑一致性校验(Logic Check)\n\n对于**事故时间信息**,必须将用户描述的时间与当前系统时间进行比对。\n\n如果用户描述的时间大于当前时间(即“未来时间”),属于反事实逻辑错误,必须立即指出并要求纠正。\n\n对应回复:\n\n`1002事故时间不能是未来。请您仔细回忆一下,事故具体是几点几分发生的?`\n\n## 收到回复后:验证与行动\n\n### 情况A:答案清晰、有效、且相关\n\n当能够从语音转写中明确提取出关键信息时,执行“确认-提问”模式:\n\n先简短复述你确认的信息,使用用户原话或复述的关键信息词汇,然后立即提出流程中的下一个问题。\n\n示例:\n\n`1002好的,我明白了,事故车辆是两辆。请问这次事故中,有没有人员受伤呢?`\n\n示例:\n\n`1002好的,确认没有人员受伤。请问事故中有没有撞到电瓶车、摩托车或者自行车呢?`\n\n### 情况B:答案无效\n\n无效答案包括:\n\n* 模糊回答\n* 无关回答\n* 简单语气词\n* “继续”、“我不是”等回避性回答\n* ASR 转写置信度低\n* 内容破碎\n* 与当前问题不匹配\n\n此时立即触发“断言式澄清协议”(Assertive Clarification Protocol)。\n\n#### 第一级澄清:锁定问题,明确要求\n\n你必须直接指出回答无效,并强调必须回答当前问题才能继续。同时提供明确的回答示例或限定词,降低用户理解难度。\n\n通用模板:\n\n`1002抱歉,我需要先知道[当前问题]的具体信息才能继续。请您清晰地回答:[完整重复一遍问题]?比如:[提供一个简短的示例或选项]。`\n\n针对“继续”:\n\n`1002抱歉,我不能继续,我必须先知道[问题]的具体情况。请您告诉我[重复问题]?`\n\n针对“我不是”(答非所问时):\n\n`1002您说的“我不是”与当前问题不符。我需要先确认[当前问题],请您回答:[重复当前问题]?`\n\n针对模糊或语气词:\n\n`1002我没有听清楚您的意思,或者您的回答不明确。请问[重复当前问题]?比如:[提供一个简短的示例或选项]?`\n\n针对疑似 ASR 误识别人伤:\n\n`1002我刚才没有完全听清楚。请您明确确认一下,目前事故中是否有人受伤?请回答“有”或者“没有”。`\n\n针对时间逻辑错误(反事实):\n\n`1002事故时间不能是未来。请您仔细回忆一下,事故具体是几点几分发生的?`\n\n#### 第二级澄清:强制选择 / 引导式追问\n\n如果第一级澄清后,用户依然回避,将问题转化为无法回避的强制选择题或更具体的引导式追问,再次提供示例。\n\n针对“涉及几辆车”问题:\n\n`1002为了处理事故,我需要知道涉及的车辆数量。请您给出一个具体的数字,比如是“一辆车”、“两辆车”还是更多?`\n\n针对“人伤”问题:\n\n`1002请您再确认一下,目前事故中是否有人受伤呢?是“有”还是“没有”?`\n\n#### 最终失败\n\n如果两轮“断言式澄清”后仍无法获得有效信息,**触发`0002`状态**转接人工。\n\n### 情况C:用户无回复\n\n如果输入为:\n\n`【用户无回复】`\n\n处理方式:\n\n* 第一次:尝试唤醒。\n* 第二次连续出现:触发 `0004` 状态。\n\n第一次无回复回复:\n\n`1002请问您还在吗?如果听到请回复我一下。`\n\n第二次连续无回复回复:\n\n`0004由于长时间没有收到您的回应,为避免影响事故处理,我将为您转接人工警员。请保持通话,不要挂断。`\n\n---\n\n# 状态编码表(State Definitions)\n\n| 状态编码 | 定义 | 触发条件与对应回复示例 |\n| :------- | :------------------ | :------------------------------------------------------------------------ |\n| **0001** | **转接人工** | 用户主动、明确要求转人工,如“转人工”、“找警察”、“接给人工客服”。 |\n| **0002** | **语义无法识别 / 连续偏离主题** | 根据“核心对话逻辑”,在两轮“断言式澄清”后,用户的回复依然无效、模糊或无法识别。 |\n| | | 回复:`0002抱歉,我多次尝试还是没能准确理解您的意思。为了不耽误您的时间,现在为您转接人工处理。请稍候。` |\n| **0003** | **有人伤 / 复杂情况转人工** | 根据“安全优先”和“语音转写鲁棒的人伤判断”原则,从用户描述中明确或高度可信地判断存在紧急或严重伤情,或者事故涉及三辆及以上机动车。 |\n| | | 回复:`0003收到,情况紧急。由于有人员受伤或情况复杂,我将立即为您转接人工警员。请千万不要挂断电话,保持通话。` |\n| **0004** | **长时间无应答** | 根据“核心对话逻辑”,连续两次收到 `【用户无回复】`。 |\n| **1002** | **通话中** | 信息收集过程中的默认状态。 |\n| **2000** | **结束,进入单车拍照环节** | 信息收集完毕,且事故只涉及一辆机动车,并确认无非机动车 / 行人、无人伤。 |\n| **2010** | **结束,进入双车拍照环节** | 信息收集完毕,且事故涉及两辆机动车,并确认无非机动车 / 行人、无人伤。 |\n\n---\n\n# 任务流程(严格按此顺序和逻辑执行)\n\n**交互起点:系统已确认用户准备就绪(用户已回复【开始】或者【继续办理】),AI开始接管。**\n\n# 阶段一:双重安全评估及事故描述\n\n## 1. 询问事故经过(优先)\n\n你的输出:\n\n`1002您好,下面我需要向您收集一些事故信息,请您在我问完后再回答。请简单描述一下事发经过,比如车辆大概是怎么撞在一起的?`\n\n## 2. 第一层安全检查:人伤排查\n\n系统输入:用户已描述事故经过。\n\n你的输出:\n\n`1002好的,我明白了。请问这次事故中,有没有人员受伤呢?`\n\n### 处理第一层应答\n\n#### 如果用户回答“有”或疑似有人伤\n\n如果语义明确或高度可信,包括“好像有”、“有点疼”、“不舒服”、“撞伤了”、“流血了”、“倒地了”等,立即触发 `0003` 状态。\n\n你的输出:\n\n`0003收到,情况紧急。由于有人员受伤,我将立即为您转接人工警员。请千万不要挂断电话,保持通话。`\n\n#### 如果用户明确回答“没有”或“没人”\n\n安全检查通过,进入下一层检查。\n\n你的输出:\n\n`1002好的,确认没有人员受伤。请问事故中有没有撞到电瓶车、摩托车或者自行车呢?`\n\n#### 如果用户未明确回答\n\n例如“不清楚”、“不太确定”、“看不太清”,或疑似 ASR 将非人伤内容误转为人伤词但语义不完整。\n\n你的输出:\n\n`1002好的,请您再确认一下,目前事故现场是否有人受伤?请回答“有”或者“没有”。`\n\n#### 如果用户明确否定人伤\n\n例如“没有人受伤”、“人没事”、“没有流血”、“不是人受伤,是车受损”,不得因为句中出现“受伤”“流血”等词误触发 `0003`。\n\n你的输出:\n\n`1002好的,确认没有人员受伤。请问事故中有没有撞到电瓶车、摩托车或者自行车呢?`\n\n## 3. 第二层安全检查:高风险场景排查 - 非机动车 / 电瓶车\n\n### 如果用户明确回答“没有”\n\n安全检查完全通过,开始收集核心信息。\n\n进入**询问事故时间**并输出。\n\n### 如果用户回答“有”或疑似有\n\n立即进行严重程度追问。\n\n你的输出:\n\n`1002收到,有撞到非机动车。请问被撞到的人或车情况严重吗?是否需要立即呼叫救护车?`\n\n### 根据用户对严重程度的回答进行决策\n\n#### 如果回答显示情况严重\n\n例如“是的”、“流血了”、“躺着不动”、“人受伤了”、“车坏了很严重”,立即触发 `0003` 状态。\n\n你的输出:\n\n`0003收到,由于有人员受伤或情况较复杂,我将立即为您转接人工警员。请千万不要挂断电话,保持通话。`\n\n#### 如果回答显示情况不严重\n\n例如“没事,就擦破点皮”、“车刮了一下,人没事”,记录信息,然后继续常规流程。\n\n进入**询问事故时间**并输出,记得安抚“请务必注意安全”。\n\n#### 如果回答语义破碎或疑似 ASR 误识别人伤\n\n无法判断是否严重时,先确认。\n\n你的输出:\n\n`1002我刚才没有完全听清楚。请您明确确认一下,被撞到的人或车情况是否严重?是否有人受伤,或者需要呼叫救护车?`\n\n### 如果用户未明确回答\n\n例如“不清楚”、“没注意”、“好像有”。\n\n你的输出:\n\n`1002好的,请您再确认一下,事故中有没有撞到电瓶车、摩托车或者自行车呢?`\n\n---\n\n# 阶段二:核心信息收集\n\n所有正常问答均使用 `1002` 状态码,并时刻进行安全监控。\n\n## 4. 询问事故时间\n\n当前时间:`{{$VARIABLE_NODE_ID.cTime$}}`\n\n### 思考逻辑\n\n检查历史:用户在之前的描述中是否已经提及了事故时间,比如半小时之前、十分钟之前。\n\n### 执行分支\n\n#### 分支A:用户未提及\n\n你的输出:\n\n`1002请问事故大概是什么时候发生的?请告诉我具体时间点。`\n\n#### 分支B:用户已提及,且时间合理\n\n进入**复述标准时间并确认**并输出。\n\n#### 分支C:用户已提及,但时间在未来 / 反事实\n\n你的输出:\n\n`1002事故时间不能是未来。请您仔细回忆一下,事故具体是几点几分发生的?`\n\n## 5. 复述标准时间并确认\n\n当前时间:`{{$VARIABLE_NODE_ID.cTime$}}`\n\n### 思考逻辑\n\n无论上一步是询问还是确认,用户在此步给出最终回复后,你必须再次进行反事实检测。\n\n用户提到的时间,或即将输入的时间,是否晚于当前系统时间(精确到小时)?\n\n如果是,视为无效回答。\n\n### 时间格式\n\n你一定使用 `XXXX年XX月XX日XX点XX分` 的形式向用户确认时间。\n\n你的输出示例:\n\n`1002好的,我记录的时间是2025年1月1日8点30分,请问这个时间对吗?`\n\n### 执行分支\n\n#### 分支A:用户确认,但时间在未来 / 反事实\n\n如果时间在未来,即反事实,你输出:\n\n`1002事故时间不能是未来。请您仔细回忆一下,事故具体是几点几分发生的?`\n\n#### 分支B:用户确认,且时间小于等于当前时间\n\n进入**询问用户是否在事故现场**并输出。\n\n#### 分支C:用户否定\n\n进入**询问事故时间**重新询问。\n\n## 6. 询问用户是否在事故现场\n\n前提:确保此信息未在用户初始的事故描述中提及。\n\n你的输出:\n\n`1002请问您现在还在事故现场吗?`\n\n## 7. 询问车辆数量情况(关键信息点)\n\n### 思考逻辑\n\n用户在之前的描述中是否已经提及了车辆数量情况?\n\n### 执行分支\n\n#### 分支A:车辆数量已经提及\n\n你的输出:\n\n`1002请确认一下事故车辆数量是x辆,对吗?`\n\n#### 分支B:车辆数量未提及\n\n你的输出:\n\n`1002请问有几辆汽车卷入了这次事故呢?请您告诉我一个具体的数字。`\n\n你需要记住这个数字。\n\n---\n\n# 阶段三:信息收集完毕,根据情况分流\n\n## 8. 根据车辆数量进行调度\n\n触发条件:在获得用户关于“车辆数量”的有效回复后,立即执行。\n\n此时,你必须根据已收集到的车辆信息(来自步骤7或用户初始描述)和安全检查结果进行判断。\n\n### 如果事故只涉及 1 辆机动车,且无非机动车 / 行人、无人伤\n\n你的输出:\n\n`2000好的,信息已记录。接下来将引导您对车辆进行拍照。请对准车辆前方,看清车牌,拍摄一张车前方照片。`\n\n### 如果事故涉及 2 辆机动车,且无非机动车 / 行人、无人伤\n\n你的输出:\n\n`2010好的,信息已记录。接下来将引导您和对方驾驶员进行拍照。请对准第一辆车的侧前方,看清车牌,拍摄照片。`\n\n### 如果事故涉及 3 辆或以上机动车,或任何数量的非机动车 / 行人,或有人伤亡\n\n即使情况不严重,也优先转人工。\n\n你的输出:\n\n`0003感谢您的配合。由于事故情况较复杂,为确保处理无误,我将为您转接人工警员做进一步处理。请不要挂断电话。`\n\n---\n\n# 最终输出自检\n\n在每次输出前,必须完成以下检查:\n\n1. 最终回复是否以 `状态编码` 开头。\n2. `状态编码` 是否只出现一次。\n3. `状态编码` 是否只位于最前缀。\n4. 回复正文中是否没有再次出现 ``、`` 或状态编码说明。\n5. 是否没有输出 JSON、Markdown、解释或分析过程。\n6. 是否遵守安全优先原则。\n7. 是否避免因 ASR 孤立关键词、否定句或语义破碎而误判人伤。\n8. 是否没有跳过当前尚未获得有效答案的问题。\n", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "maxLength": 100000, + "isRichText": true + }, + { + "key": "history", + "renderTypeList": [ + "numberInput", + "reference" + ], + "valueType": "chatHistory", + "label": "common:core.module.input.label.chat history", + "description": "workflow:max_dialog_rounds", + "required": true, + "min": 0, + "max": 50, + "value": 50, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteQA", + "renderTypeList": [ + "settingDatasetQuotePrompt" + ], + "label": "", + "debugLabel": "知识库引用", + "description": "", + "valueType": "datasetQuote", + "valueDesc": "", + "toolDescription": "" + }, + { + "key": "fileUrlList", + "renderTypeList": [ + "reference", + "input" + ], + "label": "app:workflow.user_file_input", + "debugLabel": "文件链接", + "valueType": "arrayString", + "value": [ + [ + "448745", + "userFiles" + ] + ], + "valueDesc": "", + "description": "app:workflow.user_file_input_desc", + "toolDescription": "" + }, + { + "key": "userChatInput", + "renderTypeList": [ + "reference", + "textarea" + ], + "valueType": "string", + "label": "workflow:user_question", + "toolDescription": "用户问题", + "required": true, + "value": [ + "yyB2uYEc8uKA", + "system_text" + ], + "valueDesc": "", + "description": "", + "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" + }, + { + "id": "reasoningText", + "key": "reasoningText", + "required": false, + "label": "workflow:reasoning_content", + "valueType": "string", + "type": "static", + "invalid": false, + "description": "" + }, + { + "id": "system_error_text", + "key": "system_error_text", + "type": "error", + "valueType": "string", + "label": "workflow:error_text", + "description": "" + } + ], + "catchError": false + }, + { + "nodeId": "agZJVmMQXusk", + "name": "解析状态", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 5010, + "y": -2115 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function extractStateAndContent(data1) {\n // Regular expression to match the STATEcontent format.\n const regex = /(.*?)<\\/state>(.*)/;\n\n // Attempt to match the regex against the input data.\n const match = data1.match(regex);\n\n // If a match is found, extract the state (group 1) and content (group 2).\n if (match && match.length > 2) {\n return {\n state: match[1],\n content: match[2],\n };\n } else {\n // If no match is found, return null or an appropriate error object.\n return { state: null, content: null }; // Or return { state: null, content: null }; or throw an error.\n }\n}\n\nfunction main({data1}){\n const extractedContent = extractStateAndContent(data1);\n const state = extractedContent.state;\n const content = extractedContent.content;\n return {\n content: content,\n state: state\n };\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "string", + "canEdit": true, + "key": "data1", + "label": "data1", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "yQaBxfrWjbRr", + "answerText" + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "state", + "valueType": "string", + "label": "state", + "valueDesc": "", + "description": "" + }, + { + "id": "udJb1g6GMwOx", + "valueType": "string", + "type": "dynamic", + "key": "content", + "label": "content" + } + ], + "catchError": true + }, + { + "nodeId": "dx6aMFcqYQ05", + "name": "Variable Update", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 6876.738408735749, + "y": -1817.322822021532 + }, + "version": "481", + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "value": [ + "agZJVmMQXusk", + "qLUQfhG0ILRX" + ], + "valueType": "string", + "renderType": "reference" + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + }, + { + "nodeId": "bZmg3Lym5gwx", + "name": "Condition", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 5899.872979286407, + "y": -1882.8443029694984 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "agZJVmMQXusk", + "qLUQfhG0ILRX" + ], + "condition": "isNotEmpty" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "mCWJYYru8qPR", + "name": "单车拍照", + "intro": "AI Large Model Chat", + "avatar": "core/workflow/template/aiChat", + "flowNodeType": "chatNode", + "showStatus": true, + "position": { + "x": 6170.765891177005, + "y": -1091.778443464595 + }, + "version": "4.9.7", + "inputs": [ + { + "key": "model", + "renderTypeList": [ + "settingLLMModel", + "reference" + ], + "label": "common:core.module.input.label.aiModel", + "valueType": "string", + "value": "doubao-seed-2-0-mini-260428", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "temperature", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "maxToken", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "isResponseAnswerText", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": true, + "valueType": "boolean", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatQuoteRole", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "value": "system", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteTemplate", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quotePrompt", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatVision", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatReasoning", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatTopP", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatStopSign", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatResponseFormat", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatJsonSchema", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "systemPrompt", + "renderTypeList": [ + "textarea", + "reference" + ], + "max": 3000, + "valueType": "string", + "label": "common:core.ai.Prompt", + "description": "common:core.app.tip.systemPromptTip", + "placeholder": "common:core.app.tip.chatNodeSystemPromptTip", + "value": "# 角色\n\n你现在进入了**事故现场拍照引导**阶段。你的角色是一名严谨、清晰的AI现场勘查引导员。你的任务是严格按照预设流程引导当事人。在此期间,你的行为模式会根据具体步骤发生改变。\n\n# 最高原则(不可违背的绝对指令)\n\n**全局中断指令(最高优先级)**:\n\n在对话的**任何阶段**,如果用户的输入包含明确的转人工意图(例如:“转人工”、“找人工”、“人工客服”),你必须**立即停止**当前所有流程,并**只输出**:\n\n`0001好的,正在为您转接人工客服,请稍候。`\n\n**客户端连续拍摄识别失败指令(高优先级)**:\n\n在单车拍照流程的任何阶段,只要收到一次格式为:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n的客户端输入,就表示客户端已经完成3次拍摄识别重试,并且3次均未成功。\n\n你必须:\n\n1. 立即停止当前单车拍照流程。\n2. 不得继续要求用户重新拍摄。\n3. 不得进入下一个拍照或信息确认阶段。\n4. 不得重复当前状态的拍照引导指令。\n5. 无论“原因”部分是什么内容,都必须只输出:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n该指令的优先级高于`【拍摄完成】`、用户自然语言回答和当前步骤的其他处理规则。\n\n**严格的输出格式**:\n\n你的所有回复都**必须**以 `状态编码` 开头。\n\n**混合流程锁定协议(Hybrid Process Lock Protocol)**:\n\n- **严格顺序**:你必须严格按照 `2000 -> 2001 -> 2002 -> 2003 -> 2004 -> 2005` 的顺序执行任务,绝不可以跳过或打乱。\n\n- **行为模式A(针对步骤2000、2001、2002、2003)**:\n - **唯一正常推进触发**:只有在接收到系统输入`【拍摄完成】`时,你才能推进到流程的下一步。\n - **客户端连续失败触发**:如果接收到`【客户端连续3次拍摄识别失败:原因】`,立即停止当前流程并返回0005。\n - **无效输入处理**:对于既不是`【拍摄完成】`,也不是`【客户端连续3次拍摄识别失败:原因】`的输入(包括用户的任何口头回答),你都必须重复当前状态的完整引导指令。\n\n- **行为模式B(针对步骤2004、2005)**:\n - **触发**:你不再等待`【拍摄完成】`指令。你需要理解用户的自然语言回答。\n - **客户端连续失败触发**:如果接收到`【客户端连续3次拍摄识别失败:原因】`,立即停止当前流程并返回0005。\n - **无效输入处理**:如果用户的回答与当前问题无关,你必须重复当前状态的完整指令。\n\n# 状态编码表(拍照引导阶段)\n\n| 状态编码 | 引导指令 / 任务 |\n|:---|:---|\n| **2000** | 请对准车辆前方看清车牌,拍摄车前方照片。 |\n| **2001** | 请对准车辆碰撞部位拍摄照片。 |\n| **2002** | 请对准被撞物品拍摄照片。 |\n| **2003** | 请切换摄像头对准本人拍摄一张正面照片。 |\n| **2004** | **确认与纠错合并**:请您核对车牌号码是否为{{$i2xYvUNWE7Zv.rWawP4BJxuH1$}}。如果正确请回答“是的”,如果错误,请直接说出或输入正确的车牌号码。 |\n| **2005** | 请确认车损位置是在车辆前方、后方还是侧面? |\n| **3001** | 好的,已记录车损位置。拍摄记录过程已完毕,下面将进入信息确认阶段。 |\n| **0001** | **全局转人工**:用户主动要求转人工。 |\n| **0002** | **流程异常转人工**:未能成功记录相关信息,为确保信息准确,转人工处理。 |\n| **0005** | **客户端连续拍摄识别失败**:客户端完成3次拍摄识别重试后仍未成功,停止自动拍照流程并转人工。 |\n\n---\n\n# 客户端连续拍摄识别失败示例\n\n**输入**:\n\n`【客户端连续3次拍摄识别失败:未识别到完整车牌】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n**输入**:\n\n`【客户端连续3次拍摄识别失败:照片上传失败】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n**输入**:\n\n`【客户端连续3次拍摄识别失败:当前无法使用摄像头】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n---\n\n# 任务流程(体现混合模式)\n\n## 流程起点:步骤2000\n\n**你的初始输出**:\n\n`2000请对准车辆前方看清车牌,拍摄车前方照片。`\n\n---\n\n## 步骤2000 -> 步骤2001(行为模式A)\n\n**当系统输入为**:\n\n`【拍摄完成】`\n\n**你的输出**:\n\n`2001请对准车辆碰撞部位拍摄照片。`\n\n**当系统输入为**:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n**当用户输入为任何其他内容时**,例如“好的”“拍好了”:\n\n**你的输出(重复指令)**:\n\n`2000请对准车辆前方看清车牌,拍摄车前方照片。`\n\n---\n\n## 步骤2001 -> 步骤2002(行为模式A)\n\n**当系统输入为**:\n\n`【拍摄完成】`\n\n**你的输出**:\n\n`2002请对准被撞物品拍摄照片。`\n\n**当系统输入为**:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n**当用户输入为任何其他内容时**,例如“OK”“已经拍了”:\n\n**你的输出(重复指令)**:\n\n`2001请对准车辆碰撞部位拍摄照片。`\n\n---\n\n## 步骤2002 -> 步骤2003(行为模式A)\n\n**当系统输入为**:\n\n`【拍摄完成】`\n\n**你的输出**:\n\n`2003请切换摄像头对准本人拍摄一张正面照片。`\n\n**当系统输入为**:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n**当用户输入为任何其他内容时**:\n\n**你的输出(重复指令)**:\n\n`2002请对准被撞物品拍摄照片。`\n\n---\n\n## 步骤2003 -> 步骤2004(行为模式A切换到行为模式B)\n\n**当系统输入为**:\n\n`【拍摄完成】`\n\n**你的输出**:\n\n`2004请您核对车牌号码是否为{{$i2xYvUNWE7Zv.rWawP4BJxuH1$}}。如果正确请回答“是的”,如果错误,请直接说出或输入正确的车牌号码。`\n\n**当系统输入为**:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n**当用户输入为任何其他内容时**:\n\n**你的输出(重复指令)**:\n\n`2003请切换摄像头对准本人拍摄一张正面照片。`\n\n---\n\n## 步骤2004 -> 步骤2005(合并后的确认与纠错流程)\n\n**AI当前状态为2004。**\n\n### 场景A:用户确认车牌正确\n\n**当用户输入为**:“是的”“没错”“对的”等肯定回答。\n\n**你的输出(继续主流程)**:\n\n`2005好的,车牌号已确认。请确认车损位置是在车辆前方、后方还是侧面?`\n\n### 场景B:用户提供新的车牌号\n\n**当用户输入为**:“不对,车牌号是苏BXXXXX”“我的车牌是沪A12345”等直接提供新信息的回答。\n\n**你的输出(记录新信息并继续主流程)**:\n\n`2005收到,已将正确的车牌号记录为苏BXXXXX。现在,请确认车损位置是在车辆前方、后方还是侧面?`\n\n### 场景C:用户回答不清晰或无关\n\n**当用户输入为**:“不是这辆车”“不对”“什么意思?”等否定但未提供新信息或无关回答。\n\n**你的输出(重复当前问题,引导用户)**:\n\n`2004请您核对车牌号码是否为{{$i2xYvUNWE7Zv.rWawP4BJxuH1$}}。如果正确请回答“是的”,如果错误,请直接说出或输入正确的车牌号码。`\n\n### 场景D:收到客户端连续失败事件\n\n**当系统输入为**:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n\n---\n\n# 流程终点:步骤2005(行为模式B)\n\n**AI当前状态为2005。**\n\n### 用户提供有效车损位置\n\n**当用户输入为**:“是车子的左前方。”等有效自然语言回答。\n\n**你的输出**:\n\n`3001好的,已记录车损位置在车辆前方和侧面。拍摄记录过程已完毕。下面将进入信息确认阶段。请问您是否是车牌号为{{$i2xYvUNWE7Zv.rWawP4BJxuH1$}}的车辆的车主?`\n\n### 用户第一次输入无效\n\n**当用户输入为**:“什么意思?”等无效自然语言回答。\n\n**你的输出(重复完整指令)**:\n\n`2005请确认车损位置是在车辆前方、后方还是侧面?`\n\n### 用户第二次输入仍然无效\n\n**你的输出(转接人工)**:\n\n`0002抱歉,未能成功记录车损位置,为确保信息准确,将为您转接人工处理。`\n\n### 收到客户端连续失败事件\n\n**当系统输入为**:\n\n`【客户端连续3次拍摄识别失败:原因】`\n\n**你的输出**:\n\n`0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "maxLength": 100000, + "isRichText": true + }, + { + "key": "history", + "renderTypeList": [ + "numberInput", + "reference" + ], + "valueType": "chatHistory", + "label": "common:core.module.input.label.chat history", + "description": "workflow:max_dialog_rounds", + "required": true, + "min": 0, + "max": 50, + "value": 50, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteQA", + "renderTypeList": [ + "settingDatasetQuotePrompt" + ], + "label": "", + "debugLabel": "知识库引用", + "description": "", + "valueType": "datasetQuote", + "valueDesc": "", + "toolDescription": "" + }, + { + "key": "fileUrlList", + "renderTypeList": [ + "reference", + "input" + ], + "label": "app:workflow.user_file_input", + "debugLabel": "文件链接", + "valueType": "arrayString", + "value": [ + [ + "448745", + "userFiles" + ] + ], + "valueDesc": "", + "description": "app:workflow.user_file_input_desc", + "toolDescription": "" + }, + { + "key": "userChatInput", + "renderTypeList": [ + "reference", + "textarea" + ], + "valueType": "string", + "label": "workflow:user_question", + "toolDescription": "用户问题", + "required": true, + "value": [ + "yyB2uYEc8uKA", + "system_text" + ], + "valueDesc": "", + "description": "", + "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" + }, + { + "id": "reasoningText", + "key": "reasoningText", + "required": false, + "label": "workflow:reasoning_content", + "valueType": "string", + "type": "static", + "invalid": false, + "description": "" + }, + { + "id": "system_error_text", + "key": "system_error_text", + "type": "error", + "valueType": "string", + "label": "workflow:error_text", + "description": "" + } + ], + "catchError": false + }, + { + "nodeId": "yyB2uYEc8uKA", + "name": "Text Editor#2", + "intro": "Can process and output fixed or incoming text. Non-string type data will be converted to string type.", + "avatar": "core/workflow/template/textConcat", + "flowNodeType": "textEditor", + "position": { + "x": 509.1027610870751, + "y": -785.7784434645952 + }, + "version": "4813", + "inputs": [ + { + "key": "system_textareaInput", + "renderTypeList": [ + "textarea" + ], + "valueType": "string", + "required": true, + "label": "workflow:concatenation_text", + "placeholder": "workflow:input_variable_list", + "value": "{{$448745.userChatInput$}}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "system_text", + "key": "system_text", + "label": "workflow:concatenation_result", + "type": "static", + "valueType": "string", + "description": "" + } + ] + }, + { + "nodeId": "ujpL4HfmaYju", + "name": "Condition#2", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 1250.3022292941282, + "y": -372.13757813794984 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "OR", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "startWith", + "value": "100" + } + ] + }, + { + "condition": "AND", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "startWith", + "value": "200" + } + ] + }, + { + "condition": "AND", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "startWith", + "value": "201" + } + ] + }, + { + "condition": "AND", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "3001" + } + ] + }, + { + "condition": "AND", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "3002" + } + ] + }, + { + "condition": "OR", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "0000" + } + ] + }, + { + "condition": "OR", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "0001" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "0002" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "0003" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "0005", + "valueType": "input" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "k318kWi02OU9", + "name": "双车拍照", + "intro": "AI Large Model Chat", + "avatar": "core/workflow/template/aiChat", + "flowNodeType": "chatNode", + "showStatus": true, + "position": { + "x": 5940, + "y": 285 + }, + "version": "4.9.7", + "inputs": [ + { + "key": "model", + "renderTypeList": [ + "settingLLMModel", + "reference" + ], + "label": "common:core.module.input.label.aiModel", + "valueType": "string", + "value": "doubao-seed-2-0-mini-260428", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "temperature", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "maxToken", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "isResponseAnswerText", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": true, + "valueType": "boolean", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatQuoteRole", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "value": "system", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteTemplate", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quotePrompt", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatVision", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatReasoning", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatTopP", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatStopSign", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatResponseFormat", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatJsonSchema", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "systemPrompt", + "renderTypeList": [ + "textarea", + "reference" + ], + "max": 3000, + "valueType": "string", + "label": "common:core.ai.Prompt", + "description": "common:core.app.tip.systemPromptTip", + "placeholder": "common:core.app.tip.chatNodeSystemPromptTip", + "value": "# 角色\n你现在进入了**双车事故现场拍照与核验**阶段。你的角色是一名严谨、精确的AI现场勘查引导员。你的唯一任务是严格按照预设流程,引导当事人完成一系列拍照和信息确认。你的行为模式会根据具体步骤发生改变。\n\n# 最高原则 (不可违背的绝对指令)\n\n **全局中断指令 (最高优先级)**: 在对话的**任何阶段**,如果用户的输入包含明确的转人工意图(例如:“转人工”、“找人工”、“人工客服”),你必须**立即停止**当前所有流程,并**只输出** `0001好的,正在为您转接人工客服,请稍候。`\n\n **客户端连续拍摄识别失败指令**:\n- 在对话的**任何阶段**,如果接收到格式为 `【客户端连续3次拍摄识别失败:原因】` 的客户端输入,例如:\n - `【客户端连续3次拍摄识别失败:未识别到完整车牌】`\n - `【客户端连续3次拍摄识别失败:摄像头启动失败】`\n - `【客户端连续3次拍摄识别失败:图片过于模糊】`\n- 你必须理解这是客户端已经连续三次无法完成拍摄或识别。\n- 无论当前处于 `2010` 至 `2016` 中的哪个步骤,都必须**立即停止当前拍照与核验流程**。\n- 你必须**只输出**:\n `0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n- 不得继续原步骤、不得重复拍摄指令、不得要求用户再次拍摄,也不得自行尝试解决失败原因。\n- 只要收到一次符合上述格式的输入,就立即进入 `0005` 状态,不需要累计或判断失败次数。失败次数由客户端负责统计。\n\n **严格的输出格式**: 你的所有回复都**必须**以 `状态编码` 开头。\n\n **混合流程锁定协议 (Hybrid Process Lock Protocol)**:\n- **严格顺序**: 你必须严格按照 `2010 -> 2011 -> 2012 -> 2013 -> 2014 -> 2015 -> 2016` 的顺序执行任务。\n- **例外情况**: 全局转人工指令、客户端连续拍摄识别失败指令和流程异常转人工不受上述顺序限制。\n- **行为模式A (拍照监控,适用于步骤 2010 至 2015)**:\n - **唯一触发**: **只有在接收到 `【拍摄完成】` 指令时**,才能推进到下一步。\n - **无效输入处理**: 对于既不是 `【拍摄完成】`,也不符合全局中断指令或客户端连续拍摄识别失败指令的输入,你都必须**重复当前状态的完整引导指令**。\n- **行为模式B (确认与纠错,专门适用于步骤 2016)**:\n - **任务**: 你的任务是核对一个预设的车牌号,并能直接接收并记录正确的号码。你需要**理解用户的肯定、否定、直接提供新信息或无关回答**。\n - **触发**: 你不再等待 `【拍摄完成】` 指令。\n - **如果回答无关**: **重复 `2016` 状态的完整指令**进行澄清。\n\n#### # 状态编码表 (双车拍照引导阶段)\n\n| 状态编码 | 引导指令 / 任务 |\n|:---|:---|\n| **2010** | 请对准第一辆车的侧前方,看清车牌拍摄。 |\n| **2011** | 请对准第一辆车碰撞部位拍摄。 |\n| **2012** | 请对准第二辆车碰撞部位拍摄。 |\n| **2013** | 请对准第二方车辆侧后方,看清车牌拍摄。 |\n| **2014** | 请拍摄另一方驾驶人的正面照片。 |\n| **2015** | 请切换前置摄像头对准本人拍摄一张正面照片。 |\n| **2016** | **(确认与纠错合并)** 请您核对,事故一方车辆的车牌号是否为{{$mbP4DRmqf3qT.rWawP4BJxuH1$}}?如果正确请回答“是的”,如果错误,请直接说出或输入正确的车牌号码。 |\n| **3002** | 好的,车牌号已记录。感谢您的配合,拍摄记录流程已结束,下面将进入信息确认阶段。请问车牌号为{{$mbP4DRmqf3qT.rWawP4BJxuH1$}}的车辆是由您驾驶的吗? |\n| **0001** | **(全局转人工)** 好的,正在为您转接人工客服,请稍候。 |\n| **0002** | **(流程异常转人工)** 抱歉,未能成功记录车牌号,为确保信息准确,将为您转接人工处理。 |\n| **0005** | **(客户端连续拍摄识别失败转人工)** 多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。 |\n\n---\n\n# 任务流程\n\n**流程起点:(由主流程转入)**\n- **你的初始输出**: `2010请对准第一辆车的侧前方,看清车牌拍摄。`\n\n---\n\n**客户端连续拍摄识别失败处理(适用于整个流程)**\n- **当客户端输入格式为**: `【客户端连续3次拍摄识别失败:原因】`\n- **例如**: `【客户端连续3次拍摄识别失败:未识别到完整车牌】`\n- **你的输出**: `0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`\n- 输出 `0005` 后立即终止当前拍照与核验流程。\n\n---\n\n**步骤 2010 -> 2011 (行为模式A)**\n- **当系统输入为**: `【拍摄完成】`\n - **你的输出**: `2011请对准第一辆车碰撞部位拍摄。`\n- **当用户输入为**: **任何其他内容**(不包括全局中断指令和客户端连续拍摄识别失败指令,例如:“拍了”)\n - **你的输出(重复指令)**: `2010请对准第一辆车的侧前方,看清车牌拍摄。`\n\n---\n\n**步骤 2011 -> 2012 (行为模式A)**\n- **当系统输入为**: `【拍摄完成】`\n - **你的输出**: `2012请对准第二辆车碰撞部位拍摄。`\n- **当用户输入为**: **任何其他内容**(不包括全局中断指令和客户端连续拍摄识别失败指令)\n - **你的输出(重复指令)**: `2011请对准第一辆车碰撞部位拍摄。`\n\n---\n\n**步骤 2012 -> 2013 (行为模式A)**\n- **当系统输入为**: `【拍摄完成】`\n - **你的输出**: `2013请对准第二方车辆侧后方,看清车牌拍摄。`\n- **当用户输入为**: **任何其他内容**(不包括全局中断指令和客户端连续拍摄识别失败指令)\n - **你的输出(重复指令)**: `2012请对准第二辆车碰撞部位拍摄。`\n\n---\n\n**步骤 2013 -> 2014 (行为模式A)**\n- **当系统输入为**: `【拍摄完成】`\n - **你的输出**: `2014请拍摄另一方驾驶人的正面照片。`\n- **当用户输入为**: **任何其他内容**(不包括全局中断指令和客户端连续拍摄识别失败指令)\n - **你的输出(重复指令)**: `2013请对准第二方车辆侧后方,看清车牌拍摄。`\n\n---\n\n**步骤 2014 -> 2015 (行为模式A)**\n- **当系统输入为**: `【拍摄完成】`\n - **你的输出**: `2015请切换前置摄像头对准本人拍摄一张正面照片。`\n- **当系统输入为**: **任何其他内容**(不包括全局中断指令和客户端连续拍摄识别失败指令)\n - **你的输出(重复指令)**: `2014请拍摄另一方驾驶人的正面照片。`\n\n---\n\n**步骤 2015 -> 2016 (行为模式A -> B的切换点)**\n- **当系统输入为**: `【拍摄完成】`\n - **你的输出**: `2016请您核对,事故一方车辆的车牌号是否为{{$mbP4DRmqf3qT.rWawP4BJxuH1$}}?如果正确请回答“是的”,如果错误,请直接说出或输入正确的车牌号码。`\n- **当用户输入为**: **任何其他内容**(不包括全局中断指令和客户端连续拍摄识别失败指令)\n - **你的输出(重复指令)**: `2015请切换前置摄像头对准本人拍摄一张正面照片。`\n\n---\n\n**流程终点:步骤 2016 (合并后的确认与纠错流程)**\n- **(AI当前状态为2016)**\n\n- **场景A: 用户确认车牌正确**\n - **当用户输入为**: “是的”“没错”“对的”等肯定回答\n - **你的输出(结束流程)**: `3002好的,车牌号已确认。感谢您的配合,拍摄记录流程已结束,下面将进入信息确认阶段。`\n\n- **场景B: 用户提供新的车牌号**\n - **当用户输入为**: “不对,车牌号是苏BXXXXX”“我的车牌是沪A12345”等直接提供新信息的回答\n - **你的输出(记录新信息并结束流程)**: `3002收到,已将正确的车牌号记录为【苏BXXXXX】。感谢您的配合,拍摄记录流程已结束,下面将进入信息确认阶段。请问您是否是车牌号为{{$mbP4DRmqf3qT.rWawP4BJxuH1$}}的车辆的车主`\n\n- **场景C: 用户回答不清晰或无关(第一次)**\n - **当用户输入为**: “不是这辆车”“不对”“什么意思?”等否定但未提供新信息或无关回答\n - **你的输出(重复当前问题,引导用户)**: `2016请您核对,事故一方车辆的车牌号是否为{{$mbP4DRmqf3qT.rWawP4BJxuH1$}}?如果正确请回答“是的”,如果错误,请直接说出或输入正确的车牌号码。`\n\n- **场景D: 用户回答仍不清晰(第二次)**\n - **当用户输入仍为**: 无关内容\n - **你的输出(转接人工)**: `0002抱歉,未能成功记录车牌号,为确保信息准确,将为您转接人工处理。`\n\n- **场景E: 客户端报告连续拍摄识别失败**\n - **当输入格式为**: `【客户端连续3次拍摄识别失败:原因】`\n - **你的输出(立即转接人工)**: `0005多次拍摄识别仍未成功,为确保信息准确,正在为您转接人工处理,请稍候。`", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "maxLength": 100000, + "isRichText": true + }, + { + "key": "history", + "renderTypeList": [ + "numberInput", + "reference" + ], + "valueType": "chatHistory", + "label": "common:core.module.input.label.chat history", + "description": "workflow:max_dialog_rounds", + "required": true, + "min": 0, + "max": 50, + "value": 50, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteQA", + "renderTypeList": [ + "settingDatasetQuotePrompt" + ], + "label": "", + "debugLabel": "知识库引用", + "description": "", + "valueType": "datasetQuote", + "valueDesc": "", + "toolDescription": "" + }, + { + "key": "fileUrlList", + "renderTypeList": [ + "reference", + "input" + ], + "label": "app:workflow.user_file_input", + "debugLabel": "文件链接", + "valueType": "arrayString", + "value": [ + [ + "448745", + "userFiles" + ] + ], + "valueDesc": "", + "description": "app:workflow.user_file_input_desc", + "toolDescription": "" + }, + { + "key": "userChatInput", + "renderTypeList": [ + "reference", + "textarea" + ], + "valueType": "string", + "label": "workflow:user_question", + "toolDescription": "用户问题", + "required": true, + "value": [ + "yyB2uYEc8uKA", + "system_text" + ], + "valueDesc": "", + "description": "", + "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" + }, + { + "id": "reasoningText", + "key": "reasoningText", + "required": false, + "label": "workflow:reasoning_content", + "valueType": "string", + "type": "static", + "invalid": false, + "description": "" + }, + { + "id": "system_error_text", + "key": "system_error_text", + "type": "error", + "valueType": "string", + "label": "workflow:error_text", + "description": "" + } + ], + "catchError": false + }, + { + "nodeId": "scVwEa7YfVQx", + "name": "Condition#3", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 8150.512833032732, + "y": -645.5997501393636 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "z5y22KY72pOV", + "qLUQfhG0ILRX" + ], + "condition": "isEmpty" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "fRpm3NcVwT21", + "name": "Variable Update#2", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 9218.366266384397, + "y": -580.0782691913971 + }, + "version": "481", + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "value": [ + "z5y22KY72pOV", + "qLUQfhG0ILRX" + ], + "valueType": "string", + "renderType": "reference" + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + }, + { + "nodeId": "liinRLFVMXdr", + "name": "Condition#4", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 8176.327713138762, + "y": 638.7194208193687 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "q3IxKaOW5gdV", + "qLUQfhG0ILRX" + ], + "condition": "isNotEmpty" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "gyB85PcTuq7J", + "name": "Variable Update#3", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 9345.728294531928, + "y": 712.206980460045 + }, + "version": "481", + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "value": [ + "q3IxKaOW5gdV", + "qLUQfhG0ILRX" + ], + "valueType": "string", + "renderType": "reference" + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + }, + { + "nodeId": "flCMEFjHRDaL", + "name": "单车信息确认", + "intro": "AI Large Model Chat", + "avatar": "core/workflow/template/aiChat", + "flowNodeType": "chatNode", + "showStatus": true, + "position": { + "x": 3955.007222748157, + "y": 1530.815839529571 + }, + "version": "4.9.7", + "inputs": [ + { + "key": "model", + "renderTypeList": [ + "settingLLMModel", + "reference" + ], + "label": "common:core.module.input.label.aiModel", + "valueType": "string", + "value": "doubao-seed-2-0-mini-260428", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "temperature", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "maxToken", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "isResponseAnswerText", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": true, + "valueType": "boolean", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatQuoteRole", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "value": "system", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteTemplate", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quotePrompt", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatVision", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatReasoning", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatTopP", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatStopSign", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatResponseFormat", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatJsonSchema", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "systemPrompt", + "renderTypeList": [ + "textarea", + "reference" + ], + "max": 3000, + "valueType": "string", + "label": "common:core.ai.Prompt", + "description": "common:core.app.tip.systemPromptTip", + "placeholder": "common:core.app.tip.chatNodeSystemPromptTip", + "value": "# 角色\n你是一个高度集成、**安全第一**的AI信息核查员。你的一切行为都由一个严格的状态机驱动,其首要任务是在核实信息前,优先排查并处理任何与人员受伤相关的紧急情况。\n\n# 首要原则 (必须无条件遵守)\n **输出格式**: 所有回复都必须以 `状态编码` 开头。\n **安全优先**: **任何时候**,一旦从用户回答中检测到与**人员受伤**相关的词语(如“受伤了”、“撞到人了”、“流血了”),必须**立即中断**当前流程,转入人伤处理(**触发`0003`状态**)。这是最高指令。\n **流程锁定原则 (Gatekeeper Principle)**:\n * **你必须在得到当前问题的有效、相关的答案后,才能进入下一个问题。**\n * 严禁用户使用模糊词、无关回答或指令词来跳过问题。\n * 这些无效回答必须触发“核心对话逻辑”进行处理。\n **准确第一**: 在核对信息时,如果用户回答“不对”或“不是”,必须立刻追问正确的信息,并用追问到的信息覆盖预设值。\n\n# 核心对话逻辑 (处理用户输入的统一协议)\n这是你处理所有用户回复的思考流程:\n\n **收到回复后 - 验证与行动**:\n * **情况A:答案清晰、有效、且相关 (包括用户主动提供的更正信息)**\n * **执行“确认-提问”模式**: 首先,简短复述你确认的信息(`“好的,您的姓名是张三。”`),然后,立即提出流程中的下一个问题。\n * **情况B:答案无效 (模糊、无关、或属于“继续”等回避性回答)**\n * **立即触发“断言式澄清协议” (Assertive Clarification Protocol):**\n * **第一级澄清 (锁定问题,明确要求)**: 你必须直接指出回答无效,并强调必须回答当前问题才能继续。\n * **模板**: `“抱歉,我必须先确认[当前问题]的信息才能继续。请正面回答:[完整重复一遍问题]?”`\n * **第二级澄清 (强制选择)**: 如果第一级澄清后,用户依然回避,将问题转化为无法回避的强制选择题。\n * **示例 (针对“是否是车主”问题)**: `3001为了完成核实,我必须知道您与车辆的关系。请明确回答:您‘是’,还是‘不是’车主?`\n * **最终失败**: 如果两轮“断言式澄清”后仍无法获得有效信息,**触发`0002`状态**转接人工。\n * **情况C:用户无回复 (`【用户无回复】`输入)**\n * **第一次**: 尝试唤醒(`“请问您还在吗?”`)。\n * **第二次连续出现**: **触发`0004`状态**。\n\n---\n\n# 状态编码表 (State Definitions)\n\n| 状态编码 | 定义 | 触发条件与对应回复示例 |\n| :--- | :--- | :--- |\n| **0001** | **转接人工** | 用户主动、明确要求转人工。 |\n| **0002**| **语义无法识别 / 连续偏离主题** | 在两轮“断言式澄清”后,用户的回复依然无效或拒绝配合。 |\n| **0003**| **有人伤转人工** | **触发条件**: **根据“安全优先”原则,在对话的任何阶段确认存在人员受伤或紧急情况。** |\n| | | **回复**: `收到,情况紧急。我将立即为您转接人工警员,请千万不要挂断电话。`|\n| **0004**| **长时间无应答**| 连续两次收到【用户无回复】。|\n| **3001**| **通话中** | 安全检查与信息收集中过程中的默认状态。 |\n| **0000** | **核实成功** | 在所有信息核实完毕后,准备转接人工。 |\n\n---\n\n# 任务流程 (严格按此顺序和逻辑执行)\n\n**阶段一:启动与身份初步确认**\n\n **转入通话中状态并核实车辆**\n * **你的输出**: `3001好的。请问您是否是车牌号为{{$sJHCC6Uh5j2u.rWawP4BJxuH1$}}的车辆的车主?`\n **处理车辆核实应答**\n * **如果用户回答“是”**: 继续流程。\n * **如果用户回答“不是”**:\n * **你的输出**: `3001请车牌号为{{$sJHCC6Uh5j2u.rWawP4BJxuH1$}}的车辆车主进行对话。\n\n**阶段二:核心信息收集与核对**\n\n **问候并询问姓名**\n * **你的输出**: `3001好的,车主您好。为了方便称呼,请问您的姓名是什么?`\n\n **核实身份证 (先报后四位,错误则追问并完整复述)**\n * **系统预设的身份证号码**: {{$sJHCC6Uh5j2u.qLUQfhG0ILRX$}}\n * **你的输出**: `3001好的,[用户姓名]。请问您的身份证号码后四位是否是[系统预设的身份证号码的后四位]?`\n * **处理逻辑**:\n * **如果用户回答“是”**: 确认信息,进入下一步。\n * **如果用户回答“不是”: **追问** `“好的,那么您正确的身份证号码是多少?”`\n * 处理分段输入/号码不完整:\n * 如果用户只提供了一部分号码(如长度明显少于18位,例如“开头是110101...”),严禁让用户重新输入。\n * 你的行动: 复述你听到的部分,并引导补充。\n * 输出示例: 3001好的,开头是110101,后面是多少呢?\n * 循环: 重复此“接收-引导”过程,直到拼凑出完整号码。\n * 记录并完整复述以供确认: 获得完整号码后,必须播报完整的号码进行二次确认。\n * 你的输出: 3001好的,我跟您确认,您正确的身份证号码是[用户提供的完整新号码],对吗?\n * 处理二次确认:\n * 如果用户回答“对”,则用新号码覆盖预设值,进入下一步。\n * 如果用户回答“不对”,则重复步骤1“追问正确号码”。\n\n **核实手机号 (先报后四位,错误则追问并完整复述)**\n * **系统预设的手机号**: {{$sJHCC6Uh5j2u.gR0mkQpJ4Og8$}}\n * **你的输出**: `3001请问您的手机号码后四位是否是[系统预设手机号的后四位]?`\n * **处理逻辑**:\n * **如果用户回答“是”**: 确认信息,进入**第二部分**。\n * **如果用户回答“不是”**: **追问** `“好的,那么请告诉我您正在使用的手机号码?”`\n * 处理分段输入/号码不完整:\n * 如果用户只提供了一部分号码(如长度明显少于11位,例如“1380013...”),严禁让用户重新输入。\n * 你的行动: 复述你听到的部分,并引导补充。\n * 输出示例: 3001收到,1380013,接着是多少?\n * 循环: 重复此“接收-引导”过程,直到拼凑出完整号码。\n * 记录并完整复述以供确认: 获得完整号码后,必须播报完整的号码进行二次确认。\n * 你的输出: 3001跟您确认一下,您正在使用的手机号码是[用户提供的完整新号码],对吗?\n * 处理二次确认:\n * 如果用户回答“对”,则用新号码覆盖预设值,进入阶段三。\n * 如果用户回答“不对”,则重复步骤1“追问正确号码”。\n\n**阶段三:结束流程**\n\n **信息确认完成并转接**\n * **触发**: 在手机号码核实无误后立即触发。\n * **你的输出**: `0000好的,信息已全部确认无误。感谢您的配合,下面将转接人工继续处理。`", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "maxLength": 100000, + "isRichText": true + }, + { + "key": "history", + "renderTypeList": [ + "numberInput", + "reference" + ], + "valueType": "chatHistory", + "label": "common:core.module.input.label.chat history", + "description": "workflow:max_dialog_rounds", + "required": true, + "min": 0, + "max": 50, + "value": 50, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteQA", + "renderTypeList": [ + "settingDatasetQuotePrompt" + ], + "label": "", + "debugLabel": "知识库引用", + "description": "", + "valueType": "datasetQuote", + "valueDesc": "", + "toolDescription": "" + }, + { + "key": "fileUrlList", + "renderTypeList": [ + "reference", + "input" + ], + "label": "app:workflow.user_file_input", + "debugLabel": "文件链接", + "valueType": "arrayString", + "value": [ + [ + "448745", + "userFiles" + ] + ], + "valueDesc": "", + "description": "app:workflow.user_file_input_desc", + "toolDescription": "" + }, + { + "key": "userChatInput", + "renderTypeList": [ + "reference", + "textarea" + ], + "valueType": "string", + "label": "workflow:user_question", + "toolDescription": "用户问题", + "required": true, + "value": [ + "yyB2uYEc8uKA", + "system_text" + ], + "valueDesc": "", + "description": "", + "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" + }, + { + "id": "reasoningText", + "key": "reasoningText", + "required": false, + "label": "workflow:reasoning_content", + "valueType": "string", + "type": "static", + "invalid": false, + "description": "" + }, + { + "id": "system_error_text", + "key": "system_error_text", + "type": "error", + "valueType": "string", + "label": "workflow:error_text", + "description": "" + } + ], + "catchError": false + }, + { + "nodeId": "cOeMtHzfTu96", + "name": "解析状态#4", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 5037.393022505725, + "y": 1728.3425878492474 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function extractStateAndContent(data1) {\n // Regular expression to match the STATEcontent format.\n const regex = /(.*?)<\\/state>(.*)/;\n\n // Attempt to match the regex against the input data.\n const match = data1.match(regex);\n\n // If a match is found, extract the state (group 1) and content (group 2).\n if (match && match.length > 2) {\n return {\n state: match[1],\n content: match[2],\n };\n } else {\n // If no match is found, return null or an appropriate error object.\n return { state: null, content: null }; // Or return { state: null, content: null }; or throw an error.\n }\n}\n\nfunction main({data1}){\n const extractedContent = extractStateAndContent(data1);\n const state = extractedContent.state;\n const content = extractedContent.content;\n return {\n content: content,\n state: state\n };\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "string", + "canEdit": true, + "key": "data1", + "label": "data1", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "flCMEFjHRDaL", + "answerText" + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "state", + "valueType": "string", + "label": "state", + "valueDesc": "", + "description": "" + }, + { + "id": "udJb1g6GMwOx", + "valueType": "string", + "type": "dynamic", + "key": "content", + "label": "content" + } + ], + "catchError": true + }, + { + "nodeId": "i5yBQcW0h923", + "name": "Condition#5", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 6094.872979286407, + "y": 1957.8425878492471 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "cOeMtHzfTu96", + "qLUQfhG0ILRX" + ], + "condition": "isNotEmpty" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "aln2gMrtCYOo", + "name": "Variable Update#4", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 7080.003590875616, + "y": 2009.8425878492471 + }, + "version": "481", + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "value": [ + "cOeMtHzfTu96", + "qLUQfhG0ILRX" + ], + "valueType": "string", + "renderType": "reference" + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + }, + { + "nodeId": "tBpOv2BTrsvA", + "name": "双车信息确认", + "intro": "AI Large Model Chat", + "avatar": "core/workflow/template/aiChat", + "flowNodeType": "chatNode", + "showStatus": true, + "position": { + "x": 3414.232981050866, + "y": 2994.3781381449016 + }, + "version": "4.9.7", + "inputs": [ + { + "key": "model", + "renderTypeList": [ + "settingLLMModel", + "reference" + ], + "label": "common:core.module.input.label.aiModel", + "valueType": "string", + "value": "doubao-seed-2-0-mini-260428", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "temperature", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "maxToken", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "isResponseAnswerText", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": true, + "valueType": "boolean", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatQuoteRole", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "value": "system", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteTemplate", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quotePrompt", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatVision", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatReasoning", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "boolean", + "value": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatTopP", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "number", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatStopSign", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatResponseFormat", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "aiChatJsonSchema", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "systemPrompt", + "renderTypeList": [ + "textarea", + "reference" + ], + "max": 3000, + "valueType": "string", + "label": "common:core.ai.Prompt", + "description": "common:core.app.tip.systemPromptTip", + "placeholder": "common:core.app.tip.chatNodeSystemPromptTip", + "value": "# 角色\n你是一个高度集成、**安全第一**的AI信息核查员。你的一切行为都由一个严格的状态机驱动,其首要任务是在核实信息前,优先排查并处理任何与人员受伤相关的紧急情况。\n\n# 首要原则 (必须无条件遵守)\n **输出格式**: 所有回复都必须以 `状态编码` 开头。\n **安全优先**: **任何时候**,一旦从用户回答中检测到与**人员受伤**相关的词语(如“受伤了”、“撞到人了”、“流血了”),必须**立即中断**当前流程,转入人伤处理(**触发`0003`状态**)。这是最高指令。\n **流程锁定原则 (Gatekeeper Principle)**:\n * **你必须在得到当前问题的有效、相关的答案后,才能进入下一个问题。**\n * 严禁用户使用模糊词、无关回答或指令词来跳过问题。\n * 这些无效回答必须触发“核心对话逻辑”进行处理。\n **准确第一**: 在核对信息时,如果用户回答“不对”或“不是”,必须立刻追问正确的信息,并用追问到的信息覆盖预设值。\n\n# 核心对话逻辑 (处理用户输入的统一协议)\n这是你处理所有用户回复的思考流程:\n\n **收到回复后 - 验证与行动**:\n * **情况A:答案清晰、有效、且相关 (包括用户主动提供的更正信息)**\n * **执行“确认-提问”模式**: 首先,简短复述你确认的信息(`“好的,您的姓名是张三。”`),然后,立即提出流程中的下一个问题。\n * **情况B:答案无效 (模糊、无关、或属于“继续”等回避性回答)**\n * **立即触发“断言式澄清协议” (Assertive Clarification Protocol):**\n * **第一级澄清 (锁定问题, 明确要求)**: 你必须直接指出回答无效,并强调必须回答当前问题才能继续。\n * **模板**: `“抱歉,我必须先确认[当前问题]的信息才能继续。请正面回答:[完整重复一遍问题]?”`\n * **第二级澄清 (强制选择)**: 如果第一级澄清后,用户依然回避,将问题转化为无法回避的强制选择题。\n * **示例 (针对“是否是驾驶员”问题)**: `3002为了完成核实,我必须知道您是否是该车辆的驾驶员。请明确回答:您‘是’,还是‘不是’?`\n * **最终失败**: 如果两轮“断言式澄清”后仍无法获得有效信息,**触发`0002`状态**转接人工。\n * **情况C:用户无回复 (`【用户无回复】`输入)**\n * **第一次**: 尝试唤醒(`“请问您还在吗?”`)。\n * **第二次连续出现**: **触发`0004`状态**。\n\n---\n\n# 状态编码表 (State Definitions)\n\n| 状态编码 | 定义 | 触发条件与对应回复示例 |\n| :--- | :--- | :--- |\n| **0001** | **转接人工** | 用户主动、明确要求转人工。 |\n| **0002**| **语义无法识别 / 连续偏离主题** | 在两轮“断言式澄清”后,用户的回复依然无效或拒绝配合。 |\n| **0003**| **有人伤转人工** | **触发条件**: **根据“安全优先”原则,在对话的任何阶段确认存在人员受伤或紧急情况。** |\n| | | **回复**: `收到,情况紧急。我将立即为您转接人工警员,请千万不要挂断电话。`|\n| **0004**| **长时间无应答**| 连续两次收到【用户无回复】。|\n| **3002**| **通话中** | 安全检查与信息收集中过程中的默认状态。 |\n| **0000** | **核实成功** | 所有驾驶员信息均核实完毕,准备转接人工。 |\n\n---\n\n# 任务流程 (严格按此顺序和逻辑执行)\n\n## **第一部分:采集第一位驾驶员信息**\n\n **启动并核实驾驶员身份**\n * **你的输出**: `3002您好。请问车牌号为 {{$fsWVpSkboqW3.rWawP4BJxuH1$}} 的车辆是由您驾驶的吗?`\n * **处理逻辑**:\n * 如用户答“是”,则记录信息并进入下一步。\n * 如用户答“不是”,则要求更换通话人:`3002好的,请车牌号为 {{$fsWVpSkboqW3.rWawP4BJxuH1$}} 的车辆驾驶员来接听电话。`\n\n **问候并询问姓名**\n * **你的输出**: `3002好的,驾驶员您好。为了方便称呼,请问您的姓名是什么?`\n\n **核实身份证**\n * **系统预设的身份证号码**: {{$fsWVpSkboqW3.qLUQfhG0ILRX$}}\n * **你的输出**: `3002好的,[用户姓名]。请问您的身份证号码后四位是否是[系统预设的身份证号码的后四位]?`\n * **处理逻辑**:\n * **如果用户回答“是”**: 确认信息,进入下一步。\n * **如果用户回答“不是”: **追问** `“好的,那么您正确的身份证号码是多少?”`\n * 处理分段输入/号码不完整:\n * 如果用户只提供了一部分号码(如长度明显少于18位,例如“开头是110101...”),严禁让用户重新输入。\n * 你的行动: 复述你听到的部分,并引导补充。\n * 输出示例: 3001好的,开头是110101,后面是多少呢?\n * 循环: 重复此“接收-引导”过程,直到拼凑出完整号码。\n * 记录并完整复述以供确认: 获得完整号码后,必须播报完整的号码进行二次确认。\n * 你的输出: 3001好的,我跟您确认,您正确的身份证号码是[用户提供的完整新号码],对吗?\n * 处理二次确认:\n * 如果用户回答“对”,则用新号码覆盖预设值,进入下一步。\n * 如果用户回答“不对”,则重复步骤1“追问正确号码”。\n\n **核实手机号**\n * **系统预设的手机号**: {{$fsWVpSkboqW3.gR0mkQpJ4Og8$}}\n * **你的输出**: `3002请问您的手机号码后四位是否是[系统预设手机号的后四位]?`\n * **处理逻辑**:\n * **如果用户回答“是”**: 确认信息,进入**第二部分**。\n * **如果用户回答“不是”**: **追问** `“好的,那么请告诉我您正在使用的手机号码?”`\n * 处理分段输入/号码不完整:\n * 如果用户只提供了一部分号码(如长度明显少于11位,例如“1380013...”),严禁让用户重新输入。\n * 你的行动: 复述你听到的部分,并引导补充。\n * 输出示例: 3001收到,1380013,接着是多少?\n * 循环: 重复此“接收-引导”过程,直到拼凑出完整号码。\n * 记录并完整复述以供确认: 获得完整号码后,必须播报完整的号码进行二次确认。\n * 你的输出: 3001跟您确认一下,您正在使用的手机号码是[用户提供的完整新号码],对吗?\n * 处理二次确认:\n * 如果用户回答“对”,则用新号码覆盖预设值,进入阶段三。\n * 如果用户回答“不对”,则重复步骤1“追问正确号码”。\n\n## **第二部分:采集第二位驾驶员信息**\n\n **请求转接电话**\n * **触发**: 第一位驾驶员手机号核实完毕后。\n * **你的输出**: `3002好的,第一位驾驶员的信息已核实完毕。现在请您将电话交给另一位当事驾驶员,然后告诉我移交完毕。`\n\n **核实第二位驾驶员身份**\n * **你的输出**: `3002您好。请问车牌号为 {{$fsWVpSkboqW3.wHUmHTU2Rhlb$}} 的车辆是由您驾驶的吗?`\n * **处理逻辑**:\n * 如用户答“是”,则记录信息并进入下一步。\n * 如用户答“不是”,则必须要求更换通话人:`3002好的,为了完成核实,必须由该车驾驶员本人接听。请将电话交给他。` 然后**停留在此步骤**,直到确认为本人。\n\n **询问姓名**\n * **你的输出**: `3002好的,驾驶员您好。请问您的姓名是?`\n\n **核实身份证**\n * **系统预设的身份证号码**: {{$fsWVpSkboqW3.cUeHVjpSQUr1$}}\n * **你的输出**: `3002好的,[用户姓名]。请问您的身份证号码后四位是否是[系统预设的身份证号码的后四位]?`\n * **处理逻辑**: 与第一位驾驶员相同,确认后进入下一步。\n\n **核实手机号**\n * **系统预设的手机号**: {{$fsWVpSkboqW3.bXzM05j1bbwn$}}\n * **你的输出**: `3002请问您的手机号码后四位是否是[系统预设手机号的后四位]?`\n * **处理逻辑**: 与第一位驾驶员相同。确认后进入**第三部分**。\n\n## **第三部分:结束流程**\n\n**完成核实并转接**\n * **触发条件**: 第二位驾驶员手机号核实完毕后。\n * **你的输出**: `0000好的,两位驾驶员的信息均已核实完毕。感谢您的配合,下面将转接人工继续处理。`", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "maxLength": 100000, + "isRichText": true + }, + { + "key": "history", + "renderTypeList": [ + "numberInput", + "reference" + ], + "valueType": "chatHistory", + "label": "common:core.module.input.label.chat history", + "description": "workflow:max_dialog_rounds", + "required": true, + "min": 0, + "max": 50, + "value": 50, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "quoteQA", + "renderTypeList": [ + "settingDatasetQuotePrompt" + ], + "label": "", + "debugLabel": "知识库引用", + "description": "", + "valueType": "datasetQuote", + "valueDesc": "", + "toolDescription": "" + }, + { + "key": "fileUrlList", + "renderTypeList": [ + "reference", + "input" + ], + "label": "app:workflow.user_file_input", + "debugLabel": "文件链接", + "valueType": "arrayString", + "value": [ + [ + "448745", + "userFiles" + ] + ], + "valueDesc": "", + "description": "app:workflow.user_file_input_desc", + "toolDescription": "" + }, + { + "key": "userChatInput", + "renderTypeList": [ + "reference", + "textarea" + ], + "valueType": "string", + "label": "workflow:user_question", + "toolDescription": "用户问题", + "required": true, + "value": [ + "yyB2uYEc8uKA", + "system_text" + ], + "valueDesc": "", + "description": "", + "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" + }, + { + "id": "reasoningText", + "key": "reasoningText", + "required": false, + "label": "workflow:reasoning_content", + "valueType": "string", + "type": "static", + "invalid": false, + "description": "" + }, + { + "id": "system_error_text", + "key": "system_error_text", + "type": "error", + "valueType": "string", + "label": "workflow:error_text", + "description": "" + } + ], + "catchError": false + }, + { + "nodeId": "k4pGjQ0cd04e", + "name": "解析状态#5", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 4885.7185029331395, + "y": 3121.0631098659824 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function extractStateAndContent(data1) {\n // Regular expression to match the STATEcontent format.\n const regex = /(.*?)<\\/state>(.*)/;\n\n // Attempt to match the regex against the input data.\n const match = data1.match(regex);\n\n // If a match is found, extract the state (group 1) and content (group 2).\n if (match && match.length > 2) {\n return {\n state: match[1],\n content: match[2],\n };\n } else {\n // If no match is found, return null or an appropriate error object.\n return { state: null, content: null }; // Or return { state: null, content: null }; or throw an error.\n }\n}\n\nfunction main({data1}){\n const extractedContent = extractStateAndContent(data1);\n const state = extractedContent.state;\n const content = extractedContent.content;\n return {\n content: content,\n state: state\n };\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "string", + "canEdit": true, + "key": "data1", + "label": "data1", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "tBpOv2BTrsvA", + "answerText" + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "state", + "valueType": "string", + "label": "state", + "valueDesc": "", + "description": "" + }, + { + "id": "udJb1g6GMwOx", + "valueType": "string", + "type": "dynamic", + "key": "content", + "label": "content" + } + ], + "catchError": true + }, + { + "nodeId": "euRwFTajqcRO", + "name": "Condition#6", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 5853.466296984162, + "y": 3338.8749119355352 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "k4pGjQ0cd04e", + "qLUQfhG0ILRX" + ], + "condition": "isEmpty" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "io07e4nO84k2", + "name": "Variable Update#5", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 7154.397349538959, + "y": 3465.415610920879 + }, + "version": "481", + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "value": [ + "k4pGjQ0cd04e", + "qLUQfhG0ILRX" + ], + "valueType": "string", + "renderType": "reference" + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + }, + { + "nodeId": "krClalszmq68", + "name": "Condition#7", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 3235.0533084067215, + "y": -785.7784434645952 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "OR", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2000" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2001" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2002" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2003" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "sUStm4ekiYNS", + "name": "Condition#9", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 3534.6261499054604, + "y": 226.47271316136192 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "OR", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2010" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2011" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2012" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2013" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2014" + }, + { + "variable": [ + "VARIABLE_NODE_ID", + "status_code" + ], + "condition": "equalTo", + "value": "2015" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "fsWVpSkboqW3", + "name": "Code Sandbox#7", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 2587.8879951603426, + "y": 2099.7067792182334 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function main({state}){\n return {driver1License: state.hphm1,\n driver1ID: state.driver1ID,\n driver1Phonenumber: state.driver1Phonenumber,\n driver2License: state.hphm2,\n driver2ID: state.driver2ID,\n driver2Phonenumber: state.driver2Phonenumber\n }\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "object", + "canEdit": true, + "key": "state", + "label": "state", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "value": [ + "VARIABLE_NODE_ID", + "state" + ] + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "driver1ID", + "valueType": "string", + "label": "driver1ID", + "valueDesc": "", + "description": "" + }, + { + "id": "gR0mkQpJ4Og8", + "type": "dynamic", + "key": "driver1Phonenumber", + "valueType": "string", + "label": "driver1Phonenumber", + "valueDesc": "", + "description": "" + }, + { + "id": "wHUmHTU2Rhlb", + "valueType": "string", + "type": "dynamic", + "key": "driver2License", + "label": "driver2License" + }, + { + "id": "cUeHVjpSQUr1", + "valueType": "string", + "type": "dynamic", + "key": "driver2ID", + "label": "driver2ID" + }, + { + "id": "rWawP4BJxuH1", + "valueType": "string", + "type": "dynamic", + "key": "driver1License", + "label": "driver1License" + }, + { + "id": "bXzM05j1bbwn", + "valueType": "string", + "type": "dynamic", + "key": "driver2Phonenumber", + "label": "driver2Phonenumber" + } + ], + "catchError": true + }, + { + "nodeId": "sJHCC6Uh5j2u", + "name": "Code Sandbox#10", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 3135, + "y": 945 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function main({state}){\n return {driver1License: state.hphm1,\n driver1ID: state.driver1ID,\n driver1Phonenumber: state.driver1Phonenumber,\n driver2License: state.hphm2,\n driver2ID: state.driver2ID,\n driver2Phonenumber: state.driver2Phonenumber\n }\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "object", + "canEdit": true, + "key": "state", + "label": "state", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "value": [ + "VARIABLE_NODE_ID", + "state" + ] + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "driver1ID", + "valueType": "string", + "label": "driver1ID", + "valueDesc": "", + "description": "" + }, + { + "id": "gR0mkQpJ4Og8", + "type": "dynamic", + "key": "driver1Phonenumber", + "valueType": "string", + "label": "driver1Phonenumber", + "valueDesc": "", + "description": "" + }, + { + "id": "wHUmHTU2Rhlb", + "valueType": "string", + "type": "dynamic", + "key": "driver2License", + "label": "driver2License" + }, + { + "id": "cUeHVjpSQUr1", + "valueType": "string", + "type": "dynamic", + "key": "driver2ID", + "label": "driver2ID" + }, + { + "id": "rWawP4BJxuH1", + "valueType": "string", + "type": "dynamic", + "key": "driver1License", + "label": "driver1License" + }, + { + "id": "bXzM05j1bbwn", + "valueType": "string", + "type": "dynamic", + "key": "driver2Phonenumber", + "label": "driver2Phonenumber" + } + ], + "catchError": true + }, + { + "nodeId": "mbP4DRmqf3qT", + "name": "Code Sandbox#9", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 4885.7185029331395, + "y": 168.96756250333965 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function main({state}){\n return {driver1License: state.hphm1,\n driver1ID: state.driver1ID,\n driver1Phonenumber: state.driver1Phonenumber,\n driver2License: state.hphm2,\n driver2ID: state.driver2ID,\n driver2Phonenumber: state.driver2Phonenumber\n }\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "object", + "canEdit": true, + "key": "state", + "label": "state", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "value": [ + "VARIABLE_NODE_ID", + "state" + ] + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "driver1ID", + "valueType": "string", + "label": "driver1ID", + "valueDesc": "", + "description": "" + }, + { + "id": "gR0mkQpJ4Og8", + "type": "dynamic", + "key": "driver1Phonenumber", + "valueType": "string", + "label": "driver1Phonenumber", + "valueDesc": "", + "description": "" + }, + { + "id": "wHUmHTU2Rhlb", + "valueType": "string", + "type": "dynamic", + "key": "driver2License", + "label": "driver2License" + }, + { + "id": "cUeHVjpSQUr1", + "valueType": "string", + "type": "dynamic", + "key": "driver2ID", + "label": "driver2ID" + }, + { + "id": "rWawP4BJxuH1", + "valueType": "string", + "type": "dynamic", + "key": "driver1License", + "label": "driver1License" + }, + { + "id": "bXzM05j1bbwn", + "valueType": "string", + "type": "dynamic", + "key": "driver2Phonenumber", + "label": "driver2Phonenumber" + } + ], + "catchError": true + }, + { + "nodeId": "i2xYvUNWE7Zv", + "name": "Code Sandbox#9", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 5138.581271863097, + "y": -999.6250337216792 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function main({state}){\n return {driver1License: state.hphm1,\n driver1ID: state.driver1ID,\n driver1Phonenumber: state.driver1Phonenumber,\n driver2License: state.hphm2,\n driver2ID: state.driver2ID,\n driver2Phonenumber: state.driver2Phonenumber\n }\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "object", + "canEdit": true, + "key": "state", + "label": "state", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "value": [ + "VARIABLE_NODE_ID", + "state" + ] + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "driver1ID", + "valueType": "string", + "label": "driver1ID", + "valueDesc": "", + "description": "" + }, + { + "id": "gR0mkQpJ4Og8", + "type": "dynamic", + "key": "driver1Phonenumber", + "valueType": "string", + "label": "driver1Phonenumber", + "valueDesc": "", + "description": "" + }, + { + "id": "wHUmHTU2Rhlb", + "valueType": "string", + "type": "dynamic", + "key": "driver2License", + "label": "driver2License" + }, + { + "id": "cUeHVjpSQUr1", + "valueType": "string", + "type": "dynamic", + "key": "driver2ID", + "label": "driver2ID" + }, + { + "id": "rWawP4BJxuH1", + "valueType": "string", + "type": "dynamic", + "key": "driver1License", + "label": "driver1License" + }, + { + "id": "bXzM05j1bbwn", + "valueType": "string", + "type": "dynamic", + "key": "driver2Phonenumber", + "label": "driver2Phonenumber" + } + ], + "catchError": true + }, + { + "nodeId": "z5y22KY72pOV", + "name": "解析状态#10", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 7425.995331671787, + "y": -955.0997501393636 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function extractStateAndContent(data1) {\n // Regular expression to match the STATEcontent format.\n const regex = /(.*?)<\\/state>(.*)/;\n\n // Attempt to match the regex against the input data.\n const match = data1.match(regex);\n\n // If a match is found, extract the state (group 1) and content (group 2).\n if (match && match.length > 2) {\n return {\n state: match[1],\n content: match[2],\n };\n } else {\n // If no match is found, return null or an appropriate error object.\n return { state: null, content: null }; // Or return { state: null, content: null }; or throw an error.\n }\n}\n\nfunction main({data1}){\n const extractedContent = extractStateAndContent(data1);\n const state = extractedContent.state;\n const content = extractedContent.content;\n return {\n content: content,\n state: state\n };\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "string", + "canEdit": true, + "key": "data1", + "label": "data1", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "mCWJYYru8qPR", + "answerText" + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "state", + "valueType": "string", + "label": "state", + "valueDesc": "", + "description": "" + }, + { + "id": "udJb1g6GMwOx", + "valueType": "string", + "type": "dynamic", + "key": "content", + "label": "content" + } + ], + "catchError": true + }, + { + "nodeId": "q3IxKaOW5gdV", + "name": "解析状态#9", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 7095, + "y": 465 + }, + "version": "482", + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "valueDesc": "", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "value": "js", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "value": "function extractStateAndContent(data1) {\n // Regular expression to match the STATEcontent format.\n const regex = /(.*?)<\\/state>(.*)/;\n\n // Attempt to match the regex against the input data.\n const match = data1.match(regex);\n\n // If a match is found, extract the state (group 1) and content (group 2).\n if (match && match.length > 2) {\n return {\n state: match[1],\n content: match[2],\n };\n } else {\n // If no match is found, return null or an appropriate error object.\n return { state: null, content: null }; // Or return { state: null, content: null }; or throw an error.\n }\n}\n\nfunction main({data1}){\n const extractedContent = extractStateAndContent(data1);\n const state = extractedContent.state;\n const content = extractedContent.content;\n return {\n content: content,\n state: state\n };\n}", + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "", + "valueType": "string" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "string", + "canEdit": true, + "key": "data1", + "label": "data1", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "k318kWi02OU9", + "answerText" + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "description": "Error information of code execution, returns empty on success", + "valueType": "string", + "type": "error" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "state", + "valueType": "string", + "label": "state", + "valueDesc": "", + "description": "" + }, + { + "id": "udJb1g6GMwOx", + "valueType": "string", + "type": "dynamic", + "key": "content", + "label": "content" + } + ], + "catchError": true + }, + { + "nodeId": "kbba6T0A0cME", + "name": "Assigned Reply#2", + "intro": "This module can directly reply with a specified content. Commonly used for guidance or prompts. Non-string content will be converted to string for output.", + "avatar": "core/workflow/template/reply", + "flowNodeType": "answerNode", + "position": { + "x": 2091.8142617646504, + "y": 1167.9675625033396 + }, + "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": "{{$VARIABLE_NODE_ID.status_code$}}所有信息以收集完毕,正在转接人工,请稍候", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "isRichText": false, + "maxLength": 100000 + } + ], + "outputs": [] + }, + { + "nodeId": "mzDpCKsdDlZd", + "name": "Assigned Reply#3", + "intro": "This module can directly reply with a specified content. Commonly used for guidance or prompts. Non-string content will be converted to string for output.", + "avatar": "core/workflow/template/reply", + "flowNodeType": "answerNode", + "position": { + "x": 1873.8183718024648, + "y": 1684.8778651206744 + }, + "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": "{{$VARIABLE_NODE_ID.status_code$}}正在转接人工,请稍候", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "isRichText": false, + "maxLength": 100000 + } + ], + "outputs": [] + }, + { + "nodeId": "xWEWw9JV6GFa", + "name": "Assigned Reply#3", + "intro": "This module can directly reply with a specified content. Commonly used for guidance or prompts. Non-string content will be converted to string for output.", + "avatar": "core/workflow/template/reply", + "flowNodeType": "answerNode", + "position": { + "x": 1102.2926613349941, + "y": -1883.0499157125691 + }, + "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": "1001您好,这里是无锡交警,我将为您远程处理交通事故。请将人员撤离至路侧安全区域,开启危险报警双闪灯、放置三角警告牌、做好安全防护,谨防二次事故伤害。若您已经准备好了,请点击继续办理,如需人工服务,请说转人工。", + "valueDesc": "", + "debugLabel": "", + "toolDescription": "", + "isRichText": false, + "maxLength": 100000 + } + ], + "outputs": [] + }, + { + "nodeId": "mErEqe061uAd", + "name": "Variable Update#6", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 1815, + "y": -1530 + }, + "version": "481", + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "is_first_message" + ], + "value": [ + "", + "" + ], + "valueType": "boolean", + "renderType": "input" + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + }, + { + "nodeId": "ffV7U6t2Wrkc", + "name": "Condition#9", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 436.7701670253358, + "y": -1391.7660436128006 + }, + "version": "481", + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "is_first_message" + ], + "condition": "equalTo", + "value": "true" + } + ] + } + ], + "valueDesc": "", + "description": "", + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "description": "" + } + ] + }, + { + "nodeId": "dDTqgmBFNDPh0DwX", + "name": "Condition#10", + "intro": "Execute different branches based on conditions.", + "avatar": "core/workflow/template/ifelse", + "flowNodeType": "ifElseNode", + "showStatus": true, + "position": { + "x": 3075, + "y": -3165 + }, + "inputs": [ + { + "key": "ifElseList", + "renderTypeList": [ + "hidden" + ], + "valueType": "any", + "label": "", + "value": [ + { + "condition": "AND", + "list": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "zl8sNWrf" + ], + "condition": "equalTo", + "value": "true", + "valueType": "input" + } + ] + } + ], + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "ifElseResult", + "key": "ifElseResult", + "label": "workflow:judgment_result", + "valueType": "string", + "type": "static", + "valueDesc": "", + "description": "" + } + ] + }, + { + "nodeId": "znnXN7FuRHfCwJmw", + "name": "文本内容提取事故信息", + "intro": "Can extract specified data from text, such as SQL statements, search keywords, code, etc.", + "avatar": "core/workflow/template/extractJson", + "flowNodeType": "contentExtract", + "showStatus": true, + "position": { + "x": 4245, + "y": -3405 + }, + "version": "4.9.2", + "inputs": [ + { + "key": "model", + "renderTypeList": [ + "selectLLMModel", + "reference" + ], + "label": "common:core.module.input.label.aiModel", + "required": true, + "valueType": "string", + "llmModelType": "extractFields", + "value": "doubao-seed-2-0-mini-260428", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "description", + "renderTypeList": [ + "textarea", + "reference" + ], + "valueType": "string", + "label": "workflow:extraction_requirements_description", + "description": "workflow:extraction_requirements_description_detail", + "placeholder": "workflow:extraction_requirements_placeholder", + "value": "目前表单为:\n{{$VARIABLE_NODE_ID.bNJkeXot$}}\n从对话中仅提取相对目前表单可以更新的数据,不更新的字段可以不返回\n事故发生时间要记录准确时间例如2026年6月17日10点51分", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "history", + "renderTypeList": [ + "numberInput", + "reference" + ], + "valueType": "chatHistory", + "label": "common:core.module.input.label.chat history", + "description": "workflow:max_dialog_rounds", + "required": true, + "min": 0, + "max": 50, + "value": 50, + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "content", + "renderTypeList": [ + "reference", + "textarea" + ], + "label": "workflow:text_to_extract", + "required": true, + "valueType": "string", + "toolDescription": "需要检索的内容", + "value": [ + "448745", + "userChatInput" + ], + "debugLabel": "" + }, + { + "key": "extractKeys", + "renderTypeList": [ + "custom" + ], + "label": "", + "valueType": "any", + "description": "workflow:target_fields_description", + "value": [ + { + "valueType": "object", + "required": true, + "defaultValue": "", + "desc": "表单更新数据", + "key": "formUpdate", + "enum": "" + } + ], + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [ + { + "id": "success", + "key": "success", + "label": "workflow:full_field_extraction", + "required": true, + "description": "提取字段全部填充时返回 true (模型提取或使用默认值均属于成功)", + "valueType": "boolean", + "type": "static", + "valueDesc": "" + }, + { + "id": "fields", + "key": "fields", + "label": "workflow:complete_extraction_result", + "required": true, + "description": "一个 JSON 字符串,例如:{\"name:\":\"YY\",\"Time\":\"2023/7/2 18:00\"}", + "valueType": "string", + "type": "static", + "valueDesc": "" + }, + { + "id": "system_error_text", + "key": "system_error_text", + "type": "error", + "valueType": "string", + "label": "workflow:error_text", + "valueDesc": "", + "description": "" + }, + { + "id": "t304GMFxQwoG9Gqk", + "key": "formUpdate", + "label": "Extraction Results-formUpdate", + "valueType": "object", + "type": "static" + } + ], + "catchError": false + }, + { + "nodeId": "ywRJRfv7ytNbITE9", + "name": "更新表单", + "intro": "Execute a simple script code, usually for complex data processing.", + "avatar": "core/workflow/template/codeRun", + "flowNodeType": "code", + "showStatus": true, + "position": { + "x": 5205, + "y": -3345 + }, + "inputs": [ + { + "key": "system_addInputParam", + "renderTypeList": [ + "addInputParam" + ], + "valueType": "dynamic", + "label": "", + "required": false, + "description": "workflow:these_variables_will_be_input_parameters_for_code_execution", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "codeType", + "renderTypeList": [ + "hidden" + ], + "label": "", + "valueType": "string", + "value": "js", + "debugLabel": "", + "toolDescription": "" + }, + { + "key": "code", + "renderTypeList": [ + "custom" + ], + "label": "", + "valueType": "string", + "value": "function main({ form, formUpdate }) {\n // 1. 安全校验:确保输入为对象,否则使用空对象\n const baseForm = (form && typeof form === 'object') ? form : {};\n const updateData = (formUpdate && typeof formUpdate === 'object') ? formUpdate : {};\n\n // 2. 初始化结果对象,基于 baseForm 的所有键\n let formNew = {};\n\n // 3. 遍历 baseForm 的所有键\n for (let key in baseForm) {\n if (Object.prototype.hasOwnProperty.call(baseForm, key)) {\n // 4. 如果 updateData 中存在该键且有值,则更新;否则保留原值\n if (updateData.hasOwnProperty(key)) {\n formNew[key] = updateData[key];\n } else {\n formNew[key] = baseForm[key];\n }\n }\n }\n\n return {\n formNew: formNew\n };\n}", + "debugLabel": "", + "toolDescription": "" + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "object", + "canEdit": true, + "key": "formUpdate", + "label": "formUpdate", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "znnXN7FuRHfCwJmw", + "t304GMFxQwoG9Gqk" + ] + }, + { + "renderTypeList": [ + "reference" + ], + "valueType": "object", + "canEdit": true, + "key": "form", + "label": "form", + "customInputConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": true + }, + "required": true, + "value": [ + "VARIABLE_NODE_ID", + "bNJkeXot" + ] + } + ], + "outputs": [ + { + "id": "system_rawResponse", + "key": "system_rawResponse", + "label": "workflow:full_response_data", + "valueType": "object", + "type": "static", + "valueDesc": "", + "description": "" + }, + { + "id": "error", + "key": "error", + "label": "workflow:error_text", + "valueType": "string", + "type": "error", + "valueDesc": "", + "description": "" + }, + { + "id": "system_addOutputParam", + "key": "system_addOutputParam", + "type": "dynamic", + "valueType": "dynamic", + "label": "", + "customFieldConfig": { + "selectValueTypeList": [ + "string", + "number", + "boolean", + "object", + "arrayString", + "arrayNumber", + "arrayBoolean", + "arrayObject", + "arrayAny", + "any", + "chatHistory", + "datasetQuote", + "dynamic", + "selectDataset", + "selectApp" + ], + "showDescription": false, + "showDefaultValue": false + }, + "description": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.", + "valueDesc": "" + }, + { + "id": "qLUQfhG0ILRX", + "type": "dynamic", + "key": "formNew", + "valueType": "object", + "label": "formNew", + "valueDesc": "", + "description": "" + } + ], + "catchError": false + }, + { + "nodeId": "zbwLMJrAICiypHwX", + "name": "Variable Update#7", + "intro": "Can update the output value of a specified node or update global variables", + "avatar": "core/workflow/template/variableUpdate", + "flowNodeType": "variableUpdate", + "showStatus": false, + "position": { + "x": 6420, + "y": -3030 + }, + "inputs": [ + { + "key": "updateList", + "valueType": "any", + "label": "", + "renderTypeList": [ + "hidden" + ], + "value": [ + { + "variable": [ + "VARIABLE_NODE_ID", + "bNJkeXot" + ], + "value": [ + "ywRJRfv7ytNbITE9", + "qLUQfhG0ILRX" + ], + "valueType": "object", + "renderType": "reference" + } + ], + "debugLabel": "", + "toolDescription": "" + } + ], + "outputs": [] + } + ], + "edges": [ + { + "source": "yQaBxfrWjbRr", + "target": "agZJVmMQXusk", + "sourceHandle": "yQaBxfrWjbRr-source-right", + "targetHandle": "agZJVmMQXusk-target-left" + }, + { + "source": "agZJVmMQXusk", + "target": "bZmg3Lym5gwx", + "sourceHandle": "agZJVmMQXusk-source-right", + "targetHandle": "bZmg3Lym5gwx-target-left" + }, + { + "source": "bZmg3Lym5gwx", + "target": "dx6aMFcqYQ05", + "sourceHandle": "bZmg3Lym5gwx-source-IF", + "targetHandle": "dx6aMFcqYQ05-target-left" + }, + { + "source": "yyB2uYEc8uKA", + "target": "ujpL4HfmaYju", + "sourceHandle": "yyB2uYEc8uKA-source-right", + "targetHandle": "ujpL4HfmaYju-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "yQaBxfrWjbRr", + "sourceHandle": "ujpL4HfmaYju-source-IF", + "targetHandle": "yQaBxfrWjbRr-target-left" + }, + { + "source": "flCMEFjHRDaL", + "target": "cOeMtHzfTu96", + "sourceHandle": "flCMEFjHRDaL-source-right", + "targetHandle": "cOeMtHzfTu96-target-left" + }, + { + "source": "cOeMtHzfTu96", + "target": "i5yBQcW0h923", + "sourceHandle": "cOeMtHzfTu96-source-right", + "targetHandle": "i5yBQcW0h923-target-left" + }, + { + "source": "tBpOv2BTrsvA", + "target": "k4pGjQ0cd04e", + "sourceHandle": "tBpOv2BTrsvA-source-right", + "targetHandle": "k4pGjQ0cd04e-target-left" + }, + { + "source": "k4pGjQ0cd04e", + "target": "euRwFTajqcRO", + "sourceHandle": "k4pGjQ0cd04e-source-right", + "targetHandle": "euRwFTajqcRO-target-left" + }, + { + "source": "euRwFTajqcRO", + "target": "io07e4nO84k2", + "sourceHandle": "euRwFTajqcRO-source-ELSE", + "targetHandle": "io07e4nO84k2-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "krClalszmq68", + "sourceHandle": "ujpL4HfmaYju-source-ELSE IF 1", + "targetHandle": "krClalszmq68-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "sUStm4ekiYNS", + "sourceHandle": "ujpL4HfmaYju-source-ELSE IF 2", + "targetHandle": "sUStm4ekiYNS-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "fsWVpSkboqW3", + "sourceHandle": "ujpL4HfmaYju-source-ELSE IF 4", + "targetHandle": "fsWVpSkboqW3-target-left" + }, + { + "source": "fsWVpSkboqW3", + "target": "tBpOv2BTrsvA", + "sourceHandle": "fsWVpSkboqW3-source-right", + "targetHandle": "tBpOv2BTrsvA-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "sJHCC6Uh5j2u", + "sourceHandle": "ujpL4HfmaYju-source-ELSE IF 3", + "targetHandle": "sJHCC6Uh5j2u-target-left" + }, + { + "source": "sJHCC6Uh5j2u", + "target": "flCMEFjHRDaL", + "sourceHandle": "sJHCC6Uh5j2u-source-right", + "targetHandle": "flCMEFjHRDaL-target-left" + }, + { + "source": "sUStm4ekiYNS", + "target": "mbP4DRmqf3qT", + "sourceHandle": "sUStm4ekiYNS-source-IF", + "targetHandle": "mbP4DRmqf3qT-target-left" + }, + { + "source": "sUStm4ekiYNS", + "target": "mbP4DRmqf3qT", + "sourceHandle": "sUStm4ekiYNS-source-ELSE", + "targetHandle": "mbP4DRmqf3qT-target-left" + }, + { + "source": "mbP4DRmqf3qT", + "target": "k318kWi02OU9", + "sourceHandle": "mbP4DRmqf3qT-source-right", + "targetHandle": "k318kWi02OU9-target-left" + }, + { + "source": "krClalszmq68", + "target": "i2xYvUNWE7Zv", + "sourceHandle": "krClalszmq68-source-IF", + "targetHandle": "i2xYvUNWE7Zv-target-left" + }, + { + "source": "krClalszmq68", + "target": "i2xYvUNWE7Zv", + "sourceHandle": "krClalszmq68-source-ELSE", + "targetHandle": "i2xYvUNWE7Zv-target-left" + }, + { + "source": "i2xYvUNWE7Zv", + "target": "mCWJYYru8qPR", + "sourceHandle": "i2xYvUNWE7Zv-source-right", + "targetHandle": "mCWJYYru8qPR-target-left" + }, + { + "source": "mCWJYYru8qPR", + "target": "z5y22KY72pOV", + "sourceHandle": "mCWJYYru8qPR-source-right", + "targetHandle": "z5y22KY72pOV-target-left" + }, + { + "source": "z5y22KY72pOV", + "target": "scVwEa7YfVQx", + "sourceHandle": "z5y22KY72pOV-source-right", + "targetHandle": "scVwEa7YfVQx-target-left" + }, + { + "source": "k318kWi02OU9", + "target": "q3IxKaOW5gdV", + "sourceHandle": "k318kWi02OU9-source-right", + "targetHandle": "q3IxKaOW5gdV-target-left" + }, + { + "source": "q3IxKaOW5gdV", + "target": "liinRLFVMXdr", + "sourceHandle": "q3IxKaOW5gdV-source-right", + "targetHandle": "liinRLFVMXdr-target-left" + }, + { + "source": "scVwEa7YfVQx", + "target": "fRpm3NcVwT21", + "sourceHandle": "scVwEa7YfVQx-source-ELSE", + "targetHandle": "fRpm3NcVwT21-target-left" + }, + { + "source": "liinRLFVMXdr", + "target": "gyB85PcTuq7J", + "sourceHandle": "liinRLFVMXdr-source-IF", + "targetHandle": "gyB85PcTuq7J-target-left" + }, + { + "source": "i5yBQcW0h923", + "target": "aln2gMrtCYOo", + "sourceHandle": "i5yBQcW0h923-source-IF", + "targetHandle": "aln2gMrtCYOo-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "kbba6T0A0cME", + "sourceHandle": "ujpL4HfmaYju-source-ELSE IF 5", + "targetHandle": "kbba6T0A0cME-target-left" + }, + { + "source": "ujpL4HfmaYju", + "target": "mzDpCKsdDlZd", + "sourceHandle": "ujpL4HfmaYju-source-ELSE IF 6", + "targetHandle": "mzDpCKsdDlZd-target-left" + }, + { + "source": "xWEWw9JV6GFa", + "target": "mErEqe061uAd", + "sourceHandle": "xWEWw9JV6GFa-source-right", + "targetHandle": "mErEqe061uAd-target-left" + }, + { + "source": "448745", + "target": "ffV7U6t2Wrkc", + "sourceHandle": "448745-source-right", + "targetHandle": "ffV7U6t2Wrkc-target-left" + }, + { + "source": "ffV7U6t2Wrkc", + "target": "xWEWw9JV6GFa", + "sourceHandle": "ffV7U6t2Wrkc-source-IF", + "targetHandle": "xWEWw9JV6GFa-target-left" + }, + { + "source": "ffV7U6t2Wrkc", + "target": "yyB2uYEc8uKA", + "sourceHandle": "ffV7U6t2Wrkc-source-ELSE", + "targetHandle": "yyB2uYEc8uKA-target-left" + }, + { + "source": "agZJVmMQXusk", + "target": "bZmg3Lym5gwx", + "sourceHandle": "agZJVmMQXusk-source_catch-right", + "targetHandle": "bZmg3Lym5gwx-target-left" + }, + { + "source": "cOeMtHzfTu96", + "target": "i5yBQcW0h923", + "sourceHandle": "cOeMtHzfTu96-source_catch-right", + "targetHandle": "i5yBQcW0h923-target-left" + }, + { + "source": "k4pGjQ0cd04e", + "target": "euRwFTajqcRO", + "sourceHandle": "k4pGjQ0cd04e-source_catch-right", + "targetHandle": "euRwFTajqcRO-target-left" + }, + { + "source": "fsWVpSkboqW3", + "target": "tBpOv2BTrsvA", + "sourceHandle": "fsWVpSkboqW3-source_catch-right", + "targetHandle": "tBpOv2BTrsvA-target-left" + }, + { + "source": "sJHCC6Uh5j2u", + "target": "flCMEFjHRDaL", + "sourceHandle": "sJHCC6Uh5j2u-source_catch-right", + "targetHandle": "flCMEFjHRDaL-target-left" + }, + { + "source": "mbP4DRmqf3qT", + "target": "k318kWi02OU9", + "sourceHandle": "mbP4DRmqf3qT-source_catch-right", + "targetHandle": "k318kWi02OU9-target-left" + }, + { + "source": "i2xYvUNWE7Zv", + "target": "mCWJYYru8qPR", + "sourceHandle": "i2xYvUNWE7Zv-source_catch-right", + "targetHandle": "mCWJYYru8qPR-target-left" + }, + { + "source": "z5y22KY72pOV", + "target": "scVwEa7YfVQx", + "sourceHandle": "z5y22KY72pOV-source_catch-right", + "targetHandle": "scVwEa7YfVQx-target-left" + }, + { + "source": "q3IxKaOW5gdV", + "target": "liinRLFVMXdr", + "sourceHandle": "q3IxKaOW5gdV-source_catch-right", + "targetHandle": "liinRLFVMXdr-target-left" + }, + { + "source": "dDTqgmBFNDPh0DwX", + "target": "znnXN7FuRHfCwJmw", + "sourceHandle": "dDTqgmBFNDPh0DwX-source-IF", + "targetHandle": "znnXN7FuRHfCwJmw-target-left" + }, + { + "source": "znnXN7FuRHfCwJmw", + "target": "ywRJRfv7ytNbITE9", + "sourceHandle": "znnXN7FuRHfCwJmw-source-right", + "targetHandle": "ywRJRfv7ytNbITE9-target-left" + }, + { + "source": "ywRJRfv7ytNbITE9", + "target": "zbwLMJrAICiypHwX", + "sourceHandle": "ywRJRfv7ytNbITE9-source-right", + "targetHandle": "zbwLMJrAICiypHwX-target-left" + }, + { + "source": "yyB2uYEc8uKA", + "target": "dDTqgmBFNDPh0DwX", + "sourceHandle": "yyB2uYEc8uKA-source-right", + "targetHandle": "dDTqgmBFNDPh0DwX-target-left" + } + ], + "chatConfig": { + "welcomeText": "", + "variables": [ + { + "id": "nnh2u7", + "key": "status_code", + "label": "status_code", + "type": "input", + "description": "", + "required": false, + "valueType": "string", + "list": [ + { + "value": "", + "label": "" + } + ], + "defaultValue": "1001", + "enums": [ + { + "value": "", + "label": "" + } + ], + "icon": "core/workflow/inputType/customVariable" + }, + { + "id": "rskg77", + "key": "state", + "label": "state", + "type": "custom", + "description": "", + "required": false, + "valueType": "object", + "list": [ + { + "value": "", + "label": "" + } + ], + "defaultValue": "{\"is_first_message\": true, \"user_is_ready\": false, \"accident_info_complete\": false,\n\"driver_info_check\": false,\n\"drivers_info_check\": false,\n\"driver_info_complete\": false,\n\"drivers_info_complete\": false,\n\"hpzl1\": \"小型蓝色车辆\",\n\"hphm1\": \"沪C1121\",\n\"driver1Phonenumber\": \"12918881212\",\n\"driver1ID\": \"310111198812223323\",\n\"hpzl2\": \"小型黄色车辆\",\n\"hphm2\": \"沪C1122\",\n\"driver2Phonenumber\": \"13918881212\",\n\"driver2ID\": \"310111198912223323\",\n\"user_no_response\": 0}", + "enums": [ + { + "value": "", + "label": "" + } + ] + }, + { + "id": "5e7q2c", + "key": "is_first_message", + "label": "is_first_message", + "type": "custom", + "description": "", + "required": false, + "valueType": "boolean", + "list": [ + { + "value": "", + "label": "" + } + ], + "defaultValue": "true", + "enums": [ + { + "value": "", + "label": "" + } + ], + "icon": "core/workflow/inputType/customVariable" + }, + { + "type": "switch", + "key": "zl8sNWrf", + "label": "needFormUpdate", + "valueType": "boolean", + "description": "是否更新表单数据", + "required": false, + "defaultValue": false + }, + { + "type": "custom", + "key": "bNJkeXot", + "label": "form", + "valueType": "object", + "description": "表单数据", + "required": false, + "defaultValue": "{\r\n \"是否人伤\": \"\",\r\n \"有无非机动车被撞\": \"\",\r\n \"事故发生时间\": \"\",\r\n \"事故发生原因\": \"\",\r\n \"事故车辆数量\": \"\" \r\n}" + } + ], + "scheduledTriggerConfig": { + "cronString": "", + "timezone": "Asia/Shanghai", + "defaultPrompt": "" + }, + "_id": "68cb747c86197e19f7339dc3" + } +} \ No newline at end of file