json
复制代码
{
"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": -155.85070978026258,
"y": -453.66673061480776
},
"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": 316.4948362521202,
"y": -877.9131065401677
},
"version": "481",
"inputs": [
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "common:core.module.input.label.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": "w1bPpAnTjeaW",
"name": "知识库搜索",
"intro": "调用"语义检索"和"全文检索"能力,从"知识库"中查找可能与问题相关的参考内容",
"avatar": "core/workflow/template/datasetSearch",
"flowNodeType": "datasetSearchNode",
"showStatus": true,
"position": {
"x": 1701.4250558645022,
"y": -1412.203410541938
},
"version": "481",
"inputs": [
{
"key": "datasets",
"renderTypeList": [
"selectDataset",
"reference"
],
"label": "选择知识库",
"value": [],
"valueType": "selectDataset",
"required": true,
"valueDesc": "{\n datasetId: string;\n}[]",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "similarity",
"renderTypeList": [
"selectDatasetParamsModal"
],
"label": "",
"value": 0.4,
"valueType": "number",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "limit",
"renderTypeList": [
"hidden"
],
"label": "",
"value": 1500,
"valueType": "number",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "searchMode",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"value": "embedding",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "usingReRank",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "boolean",
"value": false,
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "datasetSearchUsingExtensionQuery",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "boolean",
"value": true,
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "datasetSearchExtensionModel",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "datasetSearchExtensionBg",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "string",
"value": "",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "authTmbId",
"renderTypeList": [
"hidden"
],
"label": "",
"valueType": "boolean",
"value": false,
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "需要检索的内容",
"required": true,
"value": [
"448745",
"userChatInput"
],
"valueDesc": "",
"description": "",
"debugLabel": ""
},
{
"key": "collectionFilterMatch",
"renderTypeList": [
"textarea",
"reference"
],
"label": "集合元数据过滤",
"valueType": "string",
"isPro": true,
"description": "workflow:filter_description",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
}
],
"outputs": [
{
"id": "quoteQA",
"key": "quoteQA",
"label": "common:core.module.Dataset quote.label",
"description": "特殊数组格式,搜索结果为空时,返回空数组。",
"type": "static",
"valueType": "datasetQuote",
"valueDesc": "{\n id: string;\n datasetId: string;\n collectionId: string;\n sourceName: string;\n sourceId?: string;\n q: string;\n a: string\n}[]"
}
]
},
{
"nodeId": "sQSP1eGDkClf",
"name": "AI 对话",
"intro": "AI 大模型对话",
"avatar": "core/workflow/template/aiChat",
"flowNodeType": "chatNode",
"showStatus": true,
"position": {
"x": 2673.740349860121,
"y": -1590.703410541938
},
"version": "4813",
"inputs": [
{
"key": "model",
"renderTypeList": [
"settingLLMModel",
"reference"
],
"label": "AI 模型",
"valueType": "string",
"value": "qwen-plus",
"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": "提示词",
"description": "core.app.tip.systemPromptTip",
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
"valueDesc": "",
"debugLabel": "",
"toolDescription": "",
"value": "如果用户问你当前时间,那么当前时间是{{$VARIABLE_NODE_ID.cTime$}}"
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "聊天记录",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 6,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteQA",
"renderTypeList": [
"settingDatasetQuotePrompt"
],
"label": "",
"debugLabel": "知识库引用",
"description": "",
"valueType": "datasetQuote",
"value": [
"w1bPpAnTjeaW",
"quoteQA"
],
"valueDesc": "",
"toolDescription": ""
},
{
"key": "fileUrlList",
"renderTypeList": [
"reference",
"input"
],
"label": "文件链接",
"debugLabel": "文件链接",
"valueType": "arrayString",
"value": [
[
"448745",
"userFiles"
]
],
"valueDesc": "",
"description": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "用户问题",
"required": true,
"value": [
"448745",
"userChatInput"
],
"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_text",
"valueType": "string",
"type": "static",
"invalid": true,
"description": ""
}
]
},
{
"nodeId": "bSatW47tQdPv",
"name": "问题分类",
"intro": "根据用户的历史记录和当前问题判断该次提问的类型。可以添加多组问题类型,下面是一个模板例子:\n类型1: 打招呼\n类型2: 关于商品"使用"问题\n类型3: 关于商品"购买"问题\n类型4: 其他问题",
"avatar": "core/workflow/template/questionClassify",
"flowNodeType": "classifyQuestion",
"showStatus": true,
"position": {
"x": 749.3337273407709,
"y": -1077.4690201437586
},
"version": "481",
"inputs": [
{
"key": "model",
"renderTypeList": [
"selectLLMModel",
"reference"
],
"label": "AI 模型",
"required": true,
"valueType": "string",
"llmModelType": "classify",
"value": "qwen-plus",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "systemPrompt",
"renderTypeList": [
"textarea",
"reference"
],
"max": 3000,
"valueType": "string",
"label": "背景知识",
"description": "core.module.input.description.Background",
"placeholder": "core.module.input.placeholder.Classify background",
"value": [
"VARIABLE_NODE_ID",
"问题分类背景"
],
"valueDesc": "",
"debugLabel": "",
"toolDescription": "",
"selectedTypeIndex": 1
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "聊天记录",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 6,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "用户输入的问题(问题需要完善)",
"required": true,
"value": [
"448745",
"userChatInput"
],
"valueDesc": "",
"description": "",
"debugLabel": ""
},
{
"renderTypeList": [
"custom"
],
"valueType": "any",
"label": "",
"valueDesc": "",
"description": "",
"debugLabel": "",
"toolDescription": "",
"key": "agents",
"value": [
{
"value": "法律问题咨询",
"key": "wqre"
},
{
"value": "家里蹲公司规定",
"key": "sdfa"
},
{
"value": "内部数据查询",
"key": "q7r929n9t8qa"
},
{
"value": "其他",
"key": "qOpoLSOHI8Ba"
}
]
}
],
"outputs": [
{
"id": "cqResult",
"key": "cqResult",
"required": true,
"label": "workflow:classification_result",
"valueType": "string",
"type": "static",
"description": ""
}
]
},
{
"nodeId": "ckSIsMV06JET",
"name": "AI-其他回答",
"intro": "AI 大模型对话",
"avatar": "core/workflow/template/aiChat",
"flowNodeType": "chatNode",
"showStatus": true,
"position": {
"x": 1886.3910482940137,
"y": -684.1864402389158
},
"version": "4813",
"inputs": [
{
"key": "model",
"renderTypeList": [
"settingLLMModel",
"reference"
],
"label": "AI 模型",
"valueType": "string",
"value": "qwen-plus",
"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": "提示词",
"description": "core.app.tip.systemPromptTip",
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
"value": "{{$VARIABLE_NODE_ID.Ai身份背景$}}\n\n当前的分类结果是:\n {{$bSatW47tQdPv.cqResult$}},\n\n注意先和用户打招呼(早上/上午/中午/下午/晚上好),打招呼的方式要考虑到当前的真实时间\n\n如果用户问你当前时间,那么当前时间是{{$VARIABLE_NODE_ID.cTime$}}",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "聊天记录",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 6,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteQA",
"renderTypeList": [
"settingDatasetQuotePrompt"
],
"label": "",
"debugLabel": "知识库引用",
"description": "",
"valueType": "datasetQuote",
"valueDesc": "",
"toolDescription": ""
},
{
"key": "fileUrlList",
"renderTypeList": [
"reference",
"input"
],
"label": "文件链接",
"debugLabel": "文件链接",
"valueType": "arrayString",
"value": [
[
"448745",
"userFiles"
]
],
"valueDesc": "",
"description": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "用户问题",
"required": true,
"value": [
"448745",
"userChatInput"
],
"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_text",
"valueType": "string",
"type": "static",
"invalid": true,
"description": ""
}
]
},
{
"nodeId": "uEp6UFmNN5kO",
"name": "公司系统数据库查询",
"intro": "可连接常用数据库,并执行sql",
"avatar": "core/workflow/template/datasource",
"flowNodeType": "pluginModule",
"showStatus": true,
"position": {
"x": 2066.644262904746,
"y": 611.0605970545417
},
"version": "4811",
"inputs": [
{
"key": "system_forbid_stream",
"renderTypeList": [
"switch"
],
"valueType": "boolean",
"label": "禁用流输出",
"description": "强制设置嵌套运行的应用,均以非流模式运行",
"value": true,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"select",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": false,
"key": "databaseType",
"label": "databaseType",
"description": "数据库的类型",
"defaultValue": "",
"list": [
{
"label": "MySQL",
"value": "MySQL"
},
{
"label": "PostgreSQL",
"value": "PostgreSQL"
},
{
"label": "Microsoft SQL Server",
"value": "Microsoft SQL Server"
}
],
"required": true,
"value": "MySQL",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": false,
"key": "host",
"label": "host",
"description": "数据库连接host",
"defaultValue": "",
"required": true,
"list": [
{
"label": "",
"value": ""
}
],
"value": "host.docker.internal",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"numberInput",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "number",
"canEdit": false,
"key": "port",
"label": "port",
"description": "数据库连接端口号",
"defaultValue": "",
"required": true,
"list": [
{
"label": "",
"value": ""
}
],
"value": 3306,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": false,
"key": "databaseName",
"label": "databaseName",
"description": "数据库名称",
"defaultValue": "",
"required": true,
"list": [
{
"label": "",
"value": ""
}
],
"value": "company",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 1,
"valueType": "string",
"canEdit": false,
"key": "password",
"label": "password",
"description": "数据库密码",
"defaultValue": "",
"list": [
{
"label": "",
"value": ""
}
],
"required": true,
"value": [
"VARIABLE_NODE_ID",
"数据库密码"
],
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 0,
"valueType": "string",
"canEdit": false,
"key": "user",
"label": "user",
"description": "数据库账号",
"defaultValue": "",
"list": [
{
"label": "",
"value": ""
}
],
"required": true,
"value": "root",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"renderTypeList": [
"input",
"reference"
],
"selectedTypeIndex": 1,
"valueType": "string",
"canEdit": false,
"key": "sql",
"label": "sql",
"description": "sql语句,可以传入sql语句直接执行",
"defaultValue": "",
"list": [
{
"label": "",
"value": ""
}
],
"required": true,
"toolDescription": "sql语句,可以传入sql语句直接执行",
"value": [
"cY8FvblRsI25",
"answerText"
],
"valueDesc": "",
"debugLabel": ""
}
],
"outputs": [
{
"id": "result",
"type": "static",
"key": "result",
"valueType": "string",
"label": "result",
"description": "数据库连接结果",
"valueDesc": ""
}
],
"pluginId": "community-databaseConnection",
"isFolded": false
},
{
"nodeId": "qVjkmhTyoy3p",
"name": "根据数据库查询的结果构建自然语言回答",
"intro": "AI 大模型对话",
"avatar": "core/workflow/template/aiChat",
"flowNodeType": "chatNode",
"showStatus": true,
"position": {
"x": 1995.644262904746,
"y": 1704.1765618857717
},
"version": "4813",
"inputs": [
{
"key": "model",
"renderTypeList": [
"settingLLMModel",
"reference"
],
"label": "AI 模型",
"valueType": "string",
"value": "qwen-plus",
"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": "提示词",
"description": "core.app.tip.systemPromptTip",
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
"value": "请根据提供的JSON数据回答问题。要求:\n1. 只使用提供的数据作答\n2. 禁止透露SQL相关内容\n3. 用自然语言组织答案,尽最大可能精简,直接回答用户问题即可。\n4. 如果JSON中涉及到多组数据,尝试使用md格式的表格来给与输出。\n5. 如果数据中出现了邮箱,手机号码等敏感数据,尝试进行脱敏处理。手机号让中间4位呈现位星号,邮箱让@符号前面的部分的后半部分全部呈现位星号。\n6. 如果是多组数据用md格式表格输出的话,当表头不是中文时,转化为中文\n7. 当执行删除操作时,有可能会失败,此时你必须告诉用户操作失败,而不是胡说八道。\n8. 当用户提问,公司是否有某某人时,等同于查询名字为某某的员工信息。\n9. 当涉及到数字金额显示时,增加千分位来优化显示效果\n\n\n当前数据:{{$uEp6UFmNN5kO.result$}}",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "聊天记录",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 6,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteQA",
"renderTypeList": [
"settingDatasetQuotePrompt"
],
"label": "",
"debugLabel": "知识库引用",
"description": "",
"valueType": "datasetQuote",
"valueDesc": "",
"toolDescription": ""
},
{
"key": "fileUrlList",
"renderTypeList": [
"reference",
"input"
],
"label": "文件链接",
"debugLabel": "文件链接",
"valueType": "arrayString",
"value": [
[
"448745",
"userFiles"
]
],
"valueDesc": "",
"description": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "用户问题",
"required": true,
"value": [
"448745",
"userChatInput"
],
"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_text",
"valueType": "string",
"type": "static",
"invalid": true,
"description": ""
}
]
},
{
"nodeId": "cY8FvblRsI25",
"name": "AI自动生成sql语句",
"intro": "AI 大模型对话",
"avatar": "core/workflow/template/aiChat",
"flowNodeType": "chatNode",
"showStatus": true,
"position": {
"x": 1384.9151512928004,
"y": 605.7272637212084
},
"version": "4813",
"inputs": [
{
"key": "model",
"renderTypeList": [
"settingLLMModel",
"reference"
],
"label": "AI 模型",
"valueType": "string",
"value": "qwen-plus",
"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": false,
"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": "提示词",
"description": "core.app.tip.systemPromptTip",
"placeholder": "core.app.tip.chatNodeSystemPromptTip",
"value": "这是我公司系统的数据库建表语句 {{$VARIABLE_NODE_ID.公司系统建表语句$}}\n你要根据用户的提问来 生成sql语句,以便我执行。\n查询数据条数时避免用select * ,因为会有不必要的性能损耗。\n如果要执行插入操作,请直接输出sql语句,不要包含其他东西。\n\n直接返回sql语句内容,因为我下一步就是直接执行它。\n\n当前时间是 {{$VARIABLE_NODE_ID.cTime$}}\n\n",
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "history",
"renderTypeList": [
"numberInput",
"reference"
],
"valueType": "chatHistory",
"label": "聊天记录",
"description": "workflow:max_dialog_rounds",
"required": true,
"min": 0,
"max": 50,
"value": 6,
"valueDesc": "",
"debugLabel": "",
"toolDescription": ""
},
{
"key": "quoteQA",
"renderTypeList": [
"settingDatasetQuotePrompt"
],
"label": "",
"debugLabel": "知识库引用",
"description": "",
"valueType": "datasetQuote",
"valueDesc": "",
"toolDescription": ""
},
{
"key": "fileUrlList",
"renderTypeList": [
"reference",
"input"
],
"label": "文件链接",
"debugLabel": "文件链接",
"valueType": "arrayString",
"value": [
[
"448745",
"userFiles"
]
],
"valueDesc": "",
"description": "",
"toolDescription": ""
},
{
"key": "userChatInput",
"renderTypeList": [
"reference",
"textarea"
],
"valueType": "string",
"label": "用户问题",
"toolDescription": "用户问题",
"required": true,
"value": [
"448745",
"userChatInput"
],
"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_text",
"valueType": "string",
"type": "static",
"invalid": true,
"description": ""
}
]
}
],
"edges": [
{
"source": "bSatW47tQdPv",
"target": "w1bPpAnTjeaW",
"sourceHandle": "bSatW47tQdPv-source-wqre",
"targetHandle": "w1bPpAnTjeaW-target-left"
},
{
"source": "uEp6UFmNN5kO",
"target": "qVjkmhTyoy3p",
"sourceHandle": "uEp6UFmNN5kO-source-bottom",
"targetHandle": "qVjkmhTyoy3p-target-top"
},
{
"source": "w1bPpAnTjeaW",
"target": "sQSP1eGDkClf",
"sourceHandle": "w1bPpAnTjeaW-source-right",
"targetHandle": "sQSP1eGDkClf-target-left"
},
{
"source": "cY8FvblRsI25",
"target": "uEp6UFmNN5kO",
"sourceHandle": "cY8FvblRsI25-source-right",
"targetHandle": "uEp6UFmNN5kO-target-left"
},
{
"source": "448745",
"target": "bSatW47tQdPv",
"sourceHandle": "448745-source-right",
"targetHandle": "bSatW47tQdPv-target-left"
},
{
"source": "bSatW47tQdPv",
"target": "ckSIsMV06JET",
"sourceHandle": "bSatW47tQdPv-source-qOpoLSOHI8Ba",
"targetHandle": "ckSIsMV06JET-target-left"
},
{
"source": "bSatW47tQdPv",
"target": "w1bPpAnTjeaW",
"sourceHandle": "bSatW47tQdPv-source-sdfa",
"targetHandle": "w1bPpAnTjeaW-target-left"
},
{
"source": "bSatW47tQdPv",
"target": "cY8FvblRsI25",
"sourceHandle": "bSatW47tQdPv-source-q7r929n9t8qa",
"targetHandle": "cY8FvblRsI25-target-top"
}
],
"chatConfig": {
"welcomeText": "您好,我是FAQ机器人,有什么能为您效劳~",
"variables": [
{
"id": "zfun7r",
"key": "Ai身份背景",
"label": "Ai身份背景",
"type": "input",
"description": "描述AI的身份背景",
"required": true,
"valueType": "string",
"list": [
{
"value": "",
"label": ""
}
],
"defaultValue": "我是您的的智能助手,可提供以下三类业务支持:\n1️⃣ 法律咨询(民事/刑事/劳动法等条文解释)\n2️⃣ 公司制度(考勤/考核/财务等政策解读)\n3️⃣ 内部数据(部门架构/员工信息等检索)\n\n【引导策略】\n当检测到非业务相关问题时,使用结构化话术:\n\"▌检测到当前咨询可能超出我的服务范围(当前支持:📌法律咨询/📌公司制度/📌内部数据) \n建议您尝试以下提问方式: \n✦『XX情况是否符合劳动法规定?』\n✦『公司年假申请流程是什么?』\n✦『请说明研发部组织架构』 \n需要其他帮助请补充说明~\" \n\n【执行原则】\n1. 禁用道歉话术,保持专业引导姿态\n2. 用▌、📌、✦等符号视觉聚焦\n3. 始终突出三类核心业务\n4. 中文口语化但保持分项清晰手,可提供以下三类业务支持:\n1️⃣ 法律咨询(民事/刑事/劳动法等条文解释)\n2️⃣ 公司制度(考勤/考核/财务等政策解读)\n3️⃣ 内部数据(部门架构/员工信息等检索)\n\n【引导策略】\n当检测到非业务相关问题时,使用结构化话术:\n\"▌检测到当前咨询可能超出我的服务范围(当前支持:📌法律咨询/📌公司制度/📌内部数据) \n建议您尝试以下提问方式: \n✦『XX情况是否符合劳动法规定?』\n✦『公司年假申请流程是什么?』\n✦『请说明研发部组织架构』 \n需要其他帮助请补充说明~\" \n\n【执行原则】\n1. 禁用道歉话术,保持专业引导姿态\n2. 用▌、📌、✦等符号视觉聚焦\n3. 始终突出三类核心业务\n4. 中文口语化但保持分项清晰",
"enums": [
{
"value": "",
"label": ""
}
],
"icon": "core/workflow/inputType/input"
},
{
"id": "z9u4dp",
"key": "问题分类背景",
"label": "问题分类背景",
"type": "input",
"description": "",
"required": true,
"valueType": "string",
"list": [
{
"value": "",
"label": ""
}
],
"defaultValue": "# 角色\n你是一位专业的问题分类助手,能够精准识别用户意图所属领域。\n\n# 分类标准\n请严格按以下4类判断(不可新增类别):\n1. **法律咨询** - 涉及民事/刑事等法律条文解释、维权建议等\n ▶︎ 示例:离婚财产分割、劳动合同纠纷、交通事故赔偿...\n \n2. **公司规定** - 与公司制度/流程相关的官方政策查询\n ▶︎ 示例:请假流程、绩效考核标准、财务报销政策...\n \n3. **公司内部数据查询** - 需要访问公司数据库的业务数据检索\n ▶︎ 示例:[\"技术部目前有多少在职员工?\",\"2023年晋升的部门经理有哪些?\",\"销售部门最近半年的员工流动率是多少?\",\"查询部门ID为5的负责人联系方式\",\"各部门平均在职年限排行榜\",\"工号108的员工所属哪个部门?\",\"查询2024年1月之后入职的新员工名单\",\"财务部所有员工的邮箱列表\",\"工龄超过5年的员工有多少人?\",\"王伟明员工的职位变更记录\",\"2023年12月销售部的工资总额是多少?\",\"查询员工ID102的全年奖金合计\",\"对比技术部和市场部的平均基础工资\",\"上月扣款金额超过500元的员工清单\",\"2023年各部门年终奖分布情况\",\"Q2市场推广费用的支出明细\",\"最近三个月收入大于10万的记录\",\"2023年差旅费总额按部门分类统计\",\"单笔金额超过5万的支出记录有哪些?\",\"办公设备采购的月度支出趋势\",\"研发部2023年人力成本总支出\",\"工号105员工近半年工资变化曲线\",\"各部门工资支出占总支出的比例\",\"查询张经理所辖部门的财务报销记录\",\"员工离职率与部门预算的关联分析\",\"2024年春节前发放的工资明细\",\"2023年Q4销售提成最高的前十名\",\"统计近三年每月平均人力成本\",\"去年双十一期间的促销费用支出\",\"按季度统计员工福利支出变化\",\"海外项目组的成员及薪酬结构\",\"实习生转正后的薪资调整记录\",\"远程办公设备的采购支出明细\",\"部门合并前的历史人员编制数据\",\"核心员工保留专项奖金发放情况\"]\n \n4. **其他** - 不符合上述三类或无法明确判断的对话\n ▶︎ 示例:天气查询、闲聊对话、非公司相关咨询...\n\n# 处理原则\n1. 必须选择最相关的一个分类,禁止多选\n2. 涉及多个领域时,按问题核心意图判断\n3. 公司相关法律问题优先归入\"法律问题咨询\"\n4. 中文口语化表述也需按内容分类\n\n# 输出格式\n严格使用JSON,且只包含以下字段:\n{\n \"class_name\": \"分类名称\", \n \"reason\": \"20字内的分类依据说明\"\n}",
"enums": [
{
"value": "",
"label": ""
}
],
"icon": "core/workflow/inputType/input",
"maxLength": 0
},
{
"id": "j1qk7w",
"key": "数据库密码",
"label": "数据库密码",
"type": "input",
"description": "",
"required": true,
"valueType": "string",
"list": [
{
"value": "",
"label": ""
}
],
"defaultValue": "Zhouhang3520030",
"enums": [
{
"value": "",
"label": ""
}
]
},
{
"id": "stgmdr",
"key": "公司系统建表语句",
"label": "公司系统建表语句",
"type": "input",
"description": "",
"required": true,
"valueType": "string",
"list": [
{
"value": "",
"label": ""
}
],
"defaultValue": "-- 创建数据库\nCREATE DATABASE IF NOT EXISTS `company` \nCHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\n\nUSE `company`;\n\n-- 部门表\nCREATE TABLE IF NOT EXISTS `department` (\n `id` INT PRIMARY KEY AUTO_INCREMENT,\n `name` VARCHAR(50) NOT NULL COMMENT '部门名称',\n `manager_id` INT COMMENT '部门负责人ID',\n `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\n-- 员工表(含部门外键)\nCREATE TABLE IF NOT EXISTS `employee` (\n `id` INT PRIMARY KEY AUTO_INCREMENT,\n `name` VARCHAR(50) NOT NULL COMMENT '姓名',\n `position` VARCHAR(50) NOT NULL COMMENT '职位',\n `department_id` INT NOT NULL COMMENT '所属部门',\n `hire_date` DATE NOT NULL COMMENT '入职日期',\n `email` VARCHAR(100) UNIQUE COMMENT '企业邮箱',\n FOREIGN KEY (`department_id`) REFERENCES `department`(`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\n-- 工资单表(关联员工和部门)\nCREATE TABLE IF NOT EXISTS `payroll` (\n `id` INT PRIMARY KEY AUTO_INCREMENT,\n `employee_id` INT NOT NULL COMMENT '员工ID',\n `department_id` INT NOT NULL COMMENT '发放部门',\n `base_salary` DECIMAL(10,2) NOT NULL COMMENT '基础工资',\n `bonus` DECIMAL(10,2) DEFAULT 0 COMMENT '奖金',\n `deduction` DECIMAL(10,2) DEFAULT 0 COMMENT '扣款',\n `payment_date` DATE NOT NULL COMMENT '发放日期',\n FOREIGN KEY (`employee_id`) REFERENCES `employee`(`id`),\n FOREIGN KEY (`department_id`) REFERENCES `department`(`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\n-- 财务记录表\nCREATE TABLE IF NOT EXISTS `financial_record` (\n `id` INT PRIMARY KEY AUTO_INCREMENT,\n `type` ENUM('收入','支出') NOT NULL COMMENT '类型',\n `amount` DECIMAL(10,2) NOT NULL COMMENT '金额',\n `description` VARCHAR(200) COMMENT '说明',\n `record_date` DATE NOT NULL COMMENT '记录日期'\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n\n-- 添加部门负责人外键约束\nALTER TABLE `department`\nADD CONSTRAINT `fk_manager` \nFOREIGN KEY (`manager_id`) REFERENCES `employee`(`id`) \nON DELETE SET NULL;",
"maxLength": 3000,
"enums": [
{
"value": "",
"label": ""
}
],
"icon": "core/workflow/inputType/input"
}
],
"scheduledTriggerConfig": {
"cronString": "",
"timezone": "Asia/Shanghai",
"defaultPrompt": ""
},
"_id": "67cfa9730a3432804fb1c42a"
}
}