MaxKB/apps/application/flow/default_workflow.json
2024-06-24 17:05:15 +08:00

383 lines
9.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"edges": [
{
"id": "328b53ca-1f8e-402a-accc-5652e3bd7556",
"type": "app-edge",
"endPoint": {
"x": 560,
"y": 220
},
"pointsList": [
{
"x": 260,
"y": 220
},
{
"x": 370,
"y": 220
},
{
"x": 450,
"y": 220
},
{
"x": 560,
"y": 220
}
],
"properties": {},
"startPoint": {
"x": 260,
"y": 220
},
"sourceNodeId": "start-node",
"targetNodeId": "c8903650-67e0-42a3-875f-6896b33f8916",
"sourceAnchorId": "start-node_right",
"targetAnchorId": "c8903650-67e0-42a3-875f-6896b33f8916_left"
},
{
"id": "9979350a-4321-4f94-91e4-0c755db29e0c",
"type": "app-edge",
"endPoint": {
"x": 960,
"y": 220
},
"pointsList": [
{
"x": 880,
"y": 220
},
{
"x": 990,
"y": 220
},
{
"x": 850,
"y": 220
},
{
"x": 960,
"y": 220
}
],
"properties": {},
"startPoint": {
"x": 880,
"y": 220
},
"sourceNodeId": "c8903650-67e0-42a3-875f-6896b33f8916",
"targetNodeId": "ce724e9f-c741-4f22-a41c-d43247193629",
"sourceAnchorId": "c8903650-67e0-42a3-875f-6896b33f8916_right",
"targetAnchorId": "ce724e9f-c741-4f22-a41c-d43247193629_left"
},
{
"id": "3dc74fbf-b4b1-41ab-9d65-b3476d05403c",
"type": "app-edge",
"endPoint": {
"x": 1640,
"y": -330
},
"pointsList": [
{
"x": 1540,
"y": 125.5455
},
{
"x": 1650,
"y": 125.5455
},
{
"x": 1530,
"y": -330
},
{
"x": 1640,
"y": -330
}
],
"properties": {},
"startPoint": {
"x": 1540,
"y": 125.5455
},
"sourceNodeId": "ce724e9f-c741-4f22-a41c-d43247193629",
"targetNodeId": "8839b489-3949-4d27-b932-896392d3dff5",
"sourceAnchorId": "ce724e9f-c741-4f22-a41c-d43247193629_6351_right",
"targetAnchorId": "8839b489-3949-4d27-b932-896392d3dff5_left"
},
{
"id": "2e1229ab-1be7-4e98-8032-db3bbe0e4c01",
"type": "app-edge",
"endPoint": {
"x": 1650,
"y": 250
},
"pointsList": [
{
"x": 1540,
"y": 249.00050000000002
},
{
"x": 1650,
"y": 249.00050000000002
},
{
"x": 1540,
"y": 250
},
{
"x": 1650,
"y": 250
}
],
"properties": {},
"startPoint": {
"x": 1540,
"y": 249.00050000000002
},
"sourceNodeId": "ce724e9f-c741-4f22-a41c-d43247193629",
"targetNodeId": "bf0e1bca-d19a-4bb3-b269-b37f9fa1bd91",
"sourceAnchorId": "ce724e9f-c741-4f22-a41c-d43247193629_5186_right",
"targetAnchorId": "bf0e1bca-d19a-4bb3-b269-b37f9fa1bd91_left"
},
{
"id": "f689d923-641f-4039-b307-645bd3fbdf4a",
"type": "app-edge",
"endPoint": {
"x": 1650,
"y": 860
},
"pointsList": [
{
"x": 1540,
"y": 334.728
},
{
"x": 1650,
"y": 334.728
},
{
"x": 1540,
"y": 860
},
{
"x": 1650,
"y": 860
}
],
"properties": {},
"startPoint": {
"x": 1540,
"y": 334.728
},
"sourceNodeId": "ce724e9f-c741-4f22-a41c-d43247193629",
"targetNodeId": "f9cfacd9-2301-431d-a6ea-876717ccaffc",
"sourceAnchorId": "ce724e9f-c741-4f22-a41c-d43247193629_7119_right",
"targetAnchorId": "f9cfacd9-2301-431d-a6ea-876717ccaffc_left"
}
],
"nodes": [
{
"x": 130,
"y": -230,
"id": "base-node",
"type": "base-node",
"properties": {
"height": 200,
"stepName": "基本信息",
"node_data": {
"desc": "test",
"name": "test111",
"prologue": "您好,我是 MaxKB 小助手,您可以向我提出 MaxKB 使用问题。\n- MaxKB 主要功能有什么?\n- MaxKB 支持哪些大语言模型?\n- MaxKB 支持哪些文档类型?"
}
}
},
{
"x": 100,
"y": 220,
"id": "start-node",
"type": "start-node",
"properties": {
"fields": [
{
"label": "用户问题",
"value": "question",
"globeLabel": "{{开始.question}}",
"globeValue": "{{context['start-node'].question}}"
}
],
"height": 200,
"stepName": "开始"
}
},
{
"x": 720,
"y": 220,
"id": "c8903650-67e0-42a3-875f-6896b33f8916",
"type": "search-dataset-node",
"properties": {
"fields": [
{
"label": "段落列表",
"value": "paragraph_list",
"globeLabel": "{{知识库检索.paragraph_list}}",
"globeValue": "{{context['c8903650-67e0-42a3-875f-6896b33f8916'].paragraph_list}}"
},
{
"label": "满足直接回答的段落列表",
"value": "is_hit_handling_method_list",
"globeLabel": "{{知识库检索.is_hit_handling_method_list}}",
"globeValue": "{{context['c8903650-67e0-42a3-875f-6896b33f8916'].is_hit_handling_method_list}}"
},
{
"label": "检索结果",
"value": "data",
"globeLabel": "{{知识库检索.data}}",
"globeValue": "{{context['c8903650-67e0-42a3-875f-6896b33f8916'].data}}"
},
{
"label": "满足直接回答的分段内容",
"value": "directly_return",
"globeLabel": "{{知识库检索.directly_return}}",
"globeValue": "{{context['c8903650-67e0-42a3-875f-6896b33f8916'].directly_return}}"
}
],
"stepName": "知识库检索",
"node_data": {
"dataset_id_list": [],
"dataset_setting": {
"top_n": 3,
"similarity": 0.6,
"search_mode": "embedding",
"max_paragraph_char_number": 5000
},
"question_reference_address": [
"start-node",
"question"
]
}
}
},
{
"x": 1250,
"y": 220,
"id": "ce724e9f-c741-4f22-a41c-d43247193629",
"type": "condition-node",
"properties": {
"width": 600,
"stepName": "判断器",
"node_data": {
"branch": [
{
"id": "6351",
"type": "IF",
"condition": "and",
"conditions": [
{
"field": [
"c8903650-67e0-42a3-875f-6896b33f8916",
"is_hit_handling_method_list"
],
"value": "1",
"compare": "len_ge"
}
]
},
{
"id": "5186",
"type": "ELSE IF 1",
"condition": "and",
"conditions": [
{
"field": [
"c8903650-67e0-42a3-875f-6896b33f8916",
"paragraph_list"
],
"value": "1",
"compare": "len_ge"
}
]
},
{
"id": "7119",
"type": "ELSE",
"condition": "and",
"conditions": []
}
]
},
"branch_condition_list": [
{
"id": "6351",
"index": 0,
"height": 115.455
},
{
"id": "5186",
"index": 1,
"height": 115.455
},
{
"id": "7119",
"index": 2,
"height": 40
}
]
}
},
{
"x": 1800,
"y": -330,
"id": "8839b489-3949-4d27-b932-896392d3dff5",
"type": "reply-node",
"properties": {
"stepName": "指定回复",
"node_data": {
"fields": [
"c8903650-67e0-42a3-875f-6896b33f8916",
"directly_return"
],
"content": "",
"reply_type": "referencing"
}
}
},
{
"x": 1810,
"y": 250,
"id": "bf0e1bca-d19a-4bb3-b269-b37f9fa1bd91",
"type": "ai-chat-node",
"properties": {
"fields": [
{
"label": "AI 回答内容",
"value": "answer",
"globeLabel": "{{AI 对话.answer}}",
"globeValue": "{{context['bf0e1bca-d19a-4bb3-b269-b37f9fa1bd91'].answer}}"
}
],
"stepName": "AI 对话",
"node_data": {
"prompt": "已知信息:\n{{知识库检索.data}}\n问题\n{{开始.question}}",
"system": "",
"model_id": "",
"dialogue_number": 0
}
}
},
{
"x": 1810,
"y": 860,
"id": "f9cfacd9-2301-431d-a6ea-876717ccaffc",
"type": "reply-node",
"properties": {
"stepName": "指定回复1",
"node_data": {
"fields": [],
"content": "未找到相关信息",
"reply_type": "content"
}
}
}
]
}