// placeholder: '例如: \n1. Laf 是一个云函数开发平台……\n2. Sealos 是一个集群操作系统',
// value:
// ' laf 是什么\nlaf 是云开发平台,可以快速的开发应用\nlaf 是一个开源的 BaaS 开发平台(Backend as a Service)\nlaf 是一个开箱即用的 serverless 开发平台\nlaf 是一个集「函数计算」、「数据库」、「对象存储」等于一身的一站式开发平台\nlaf 可以是开源版的腾讯云开发、开源版的 Google Firebase、开源版的 UniCloud\nlaf 让每个开发团队都可以随时拥有一个自己的云开发平台!',
// connected: false
// },
// {
// key: 'history',
// type: 'target',
// label: '聊天记录',
// connected: true
// },
// {
// key: 'userChatInput',
// type: 'target',
// label: '用户问题',
// connected: true
// },
// {
// key: 'agents',
// type: 'custom',
// label: '',
// value: [
// {
// value: '打招呼、问候等',
// key: 'fasw'
// },
// {
// value: '关于 laf 云函数的问题',
// key: 'fqsw'
// },
// {
// value: '其他问题',
// key: 'q73b'
// }
// ],
// connected: false
// }
// ],
// outputs: [
// {
// key: 'fasw',
// label: '',
// type: 'hidden',
// targets: [
// {
// moduleId: 'l4e36k',
// key: 'switch'
// }
// ]
// },
// {
// key: 'fqsw',
// label: '',
// type: 'hidden',
// targets: [
// {
// moduleId: 's7qnhf',
// key: 'switch'
// }
// ]
// },
// {
// key: 'q73b',
// label: '',
// type: 'hidden',
// targets: [
// {
// moduleId: 'phwr0u',
// key: 'switch'
// }
// ]
// }
// ],
// position: {
// x: 154.9724540917009,
// y: -37.48714632270105
// },
// moduleId: '15c9bv'
// }
// ]
// }
{
id: 'simpleChat',
avatar: '/imgs/module/AI.png',
name: '简单的对话',
intro: '一个极其简单的 AI 对话应用',
modules: [
{
moduleId: 'userChatInput',
position: {
x: 464.32198615344566,
y: 1602.2698463081606
},
flowType: 'questionInput',
inputs: [
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'userChatInput',
targets: [
{
moduleId: 'chatModule',
key: 'userChatInput'
}
]
}
]
},
{
moduleId: 'history',
position: {
x: 452.5466249541586,
y: 1276.3930310334215
},
flowType: 'historyNode',
inputs: [
{
key: 'maxContext',
value: 10,
connected: true
},
{
key: 'history',
connected: true
}
],
outputs: [
{
key: 'history',
targets: [
{
moduleId: 'chatModule',
key: 'history'
}
]
}
]
},
{
moduleId: 'chatModule',
position: {
x: 981.9682828103937,
y: 890.014595014464
},
flowType: 'chatNode',
inputs: [
{
key: 'model',
value: 'gpt-3.5-turbo-16k',
connected: true
},
{
key: 'temperature',
value: 0,
connected: true
},
{
key: 'maxToken',
value: 8000,
connected: true
},
{
key: 'systemPrompt',
value: '',
connected: true
},
{
key: 'limitPrompt',
value: '',
connected: true
},
{
key: 'switch',
connected: false
},
{
key: 'quoteQA',
connected: false
},
{
key: 'history',
connected: true
},
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'answerText',
targets: []
}
]
}
]
},
{
id: 'simpleKbChat',
avatar: '/imgs/module/db.png',
name: '知识库 + 对话引导',
intro: '每次提问时进行一次知识库搜索,将搜索结果注入 LLM 模型进行参考回答',
modules: [
{
moduleId: 'userGuide',
position: {
x: 447.98520778293346,
y: 721.4016845336229
},
flowType: 'userGuide',
inputs: [
{
key: 'welcomeText',
value:
'我是 laf 助手,请问有什么可以帮助你的么?\n[laf 是什么?]\n[laf 官网是多少?]\n[交流群]',
connected: true
}
],
outputs: []
},
{
moduleId: 'userChatInput',
position: {
x: 464.32198615344566,
y: 1602.2698463081606
},
flowType: 'questionInput',
inputs: [
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'userChatInput',
targets: [
{
moduleId: 'chatModule',
key: 'userChatInput'
},
{
moduleId: 'kbSearch',
key: 'userChatInput'
}
]
}
]
},
{
moduleId: 'history',
position: {
x: 458.37518916304566,
y: 1296.7930057645262
},
flowType: 'historyNode',
inputs: [
{
key: 'maxContext',
value: 10,
connected: true
},
{
key: 'history',
connected: true
}
],
outputs: [
{
key: 'history',
targets: [
{
moduleId: 'chatModule',
key: 'history'
}
]
}
]
},
{
moduleId: 'kbSearch',
position: {
x: 956.0838440206068,
y: 887.462827870246
},
flowType: 'kbSearchNode',
inputs: [
{
key: 'kbList',
value: [],
connected: true
},
{
key: 'similarity',
value: 0.82,
connected: true
},
{
key: 'limit',
value: 5,
connected: true
},
{
key: 'switch',
connected: false
},
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'isEmpty',
targets: [
{
moduleId: 'asv5cb',
key: 'switch'
}
]
},
{
key: 'unEmpty',
targets: [
{
moduleId: 'chatModule',
key: 'switch'
}
]
},
{
key: 'quoteQA',
targets: [
{
moduleId: 'chatModule',
key: 'quoteQA'
}
]
}
]
},
{
moduleId: 'chatModule',
position: {
x: 1521.114092861523,
y: 1038.6910820851604
},
flowType: 'chatNode',
inputs: [
{
key: 'model',
value: 'gpt-3.5-turbo-16k',
connected: true
},
{
key: 'temperature',
value: 5,
connected: true
},
{
key: 'maxToken',
value: 16000,
connected: true
},
{
key: 'systemPrompt',
value: '知识库是关于 laf 的内容。',
connected: true
},
{
key: 'limitPrompt',
value: '根据知识库回答用户问题,回答范围仅限知识库。',
connected: true
},
{
key: 'switch',
connected: true
},
{
key: 'quoteQA',
connected: true
},
{
key: 'history',
connected: true
},
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'answerText',
targets: []
}
]
},
{
moduleId: 'asv5cb',
position: {
x: 1517.320542832093,
y: 699.8757371712562
},
flowType: 'answerNode',
inputs: [
{
key: 'switch',
connected: true
},
{
key: 'text',
value: '对不起,我找不到你的问题,请更加详细的描述 laf 相关的问题。',
connected: true
}
],
outputs: []
}
]
},
{
id: 'chatGuide',
avatar: '/imgs/module/userGuide.png',
name: '对话引导 + 变量',
intro: '可以在对话开始发送一段提示,或者让用户填写一些内容,作为本次对话的变量',
modules: [
{
moduleId: 'userGuide',
position: {
x: 447.98520778293346,
y: 721.4016845336229
},
flowType: 'userGuide',
inputs: [
{
key: 'welcomeText',
value:
'你好,我是翻译助手,可以帮你把内容翻译成任何语言,请告诉我,你需要翻译成什么语言?',
connected: true
}
],
outputs: []
},
{
moduleId: 'userChatInput',
position: {
x: 464.32198615344566,
y: 1602.2698463081606
},
flowType: 'questionInput',
inputs: [
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'userChatInput',
targets: [
{
moduleId: 'chatModule',
key: 'userChatInput'
}
]
}
]
},
{
moduleId: 'history',
position: {
x: 452.5466249541586,
y: 1276.3930310334215
},
flowType: 'historyNode',
inputs: [
{
key: 'maxContext',
value: 10,
connected: true
},
{
key: 'history',
connected: true
}
],
outputs: [
{
key: 'history',
targets: [
{
moduleId: 'chatModule',
key: 'history'
}
]
}
]
},
{
moduleId: 'chatModule',
position: {
x: 981.9682828103937,
y: 890.014595014464
},
flowType: 'chatNode',
inputs: [
{
key: 'model',
value: 'gpt-3.5-turbo-16k',
connected: true
},
{
key: 'temperature',
value: 0,
connected: true
},
{
key: 'maxToken',
value: 8000,
connected: true
},
{
key: 'systemPrompt',
value: '',
connected: true
},
{
key: 'limitPrompt',
value: '把用户发送的内容直接翻译成{{language}},不要做其他回答。',
connected: true
},
{
key: 'switch',
connected: false
},
{
key: 'quoteQA',
connected: false
},
{
key: 'history',
connected: true
},
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'answerText',
targets: []
}
]
},
{
moduleId: 'fo9i68',
position: {
x: 445.17843864558927,
y: 992.4891333735476
},
flowType: 'variable',
inputs: [
{
key: 'variables',
value: [
{
id: '9qjnai',
key: 'language',
label: '目标语言',
type: 'input',
required: true,
maxLen: 50,
enums: [
{
value: ''
}
]
}
],
connected: true
}
],
outputs: []
}
]
},
{
id: 'CQ',
avatar: '/imgs/module/cq.png',
name: '问题分类 + 知识库',
intro: '先对用户的问题进行分类,再根据不同类型问题,执行不同的操作',
modules: [
{
moduleId: '7z5g5h',
position: {
x: 198.56612928723575,
y: 1622.7034463081607
},
flowType: 'questionInput',
inputs: [
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'userChatInput',
targets: [
{
moduleId: 'remuj3',
key: 'userChatInput'
},
{
moduleId: 'nlfwkc',
key: 'userChatInput'
},
{
moduleId: 'fljhzy',
key: 'userChatInput'
}
]
}
]
},
{
moduleId: 'xj0c9p',
position: {
x: 194.99102398958047,
y: 1801.3545999721096
},
flowType: 'historyNode',
inputs: [
{
key: 'maxContext',
value: 10,
connected: true
},
{
key: 'history',
connected: true
}
],
outputs: [
{
key: 'history',
targets: [
{
moduleId: 'nlfwkc',
key: 'history'
}
]
}
]
},
{
moduleId: 'remuj3',
position: {
x: 672.9092284362648,
y: 1077.557793775116
},
flowType: 'classifyQuestion',
inputs: [
{
key: 'systemPrompt',
value:
'laf 是云开发平台,可以快速的开发应用\nlaf 是一个开源的 BaaS 开发平台(Backend as a Service)\nlaf 是一个开箱即用的 serverless 开发平台\nlaf 是一个集「函数计算」、「数据库」、「对象存储」等于一身的一站式开发平台\nlaf 可以是开源版的腾讯云开发、开源版的 Google Firebase、开源版的 UniCloud',
connected: true
},
{
key: 'history',
connected: true
},
{
key: 'userChatInput',
connected: true
},
{
key: 'agents',
value: [
{
value: '打招呼、问候等问题',
key: 'fasw'
},
{
value: '“laf” 的问题',
key: 'fqsw'
},
{
value: '其他问题',
key: 'fesw'
}
],
connected: true
}
],
outputs: [
{
key: 'fasw',
targets: [
{
moduleId: 'a99p6z',
key: 'switch'
}
]
},
{
key: 'fqsw',
targets: [
{
moduleId: 'fljhzy',
key: 'switch'
}
]
},
{
key: 'fesw',
targets: [
{
moduleId: 'iejcou',
key: 'switch'
}
]
}
]
},
{
moduleId: 'a99p6z',
position: {
x: 1304.2886011902247,
y: 776.1589509539264
},
flowType: 'answerNode',
inputs: [
{
key: 'switch',
connected: true
},
{
key: 'text',
value: '你好,我是 laf 助手,有什么可以帮助你的?',
connected: true
}
],
outputs: []
},
{
moduleId: 'iejcou',
position: {
x: 1301.7531189034548,
y: 1842.1297123368286
},
flowType: 'answerNode',
inputs: [
{
key: 'switch',
connected: true
},
{
key: 'text',
value: '你好,我仅能回答 laf 相关问题,请问你有什么问题么?',
connected: true
}
],
outputs: []
},
{
moduleId: 'nlfwkc',
position: {
x: 1821.979893659983,
y: 1104.6583548423682
},
flowType: 'chatNode',
inputs: [
{
key: 'model',
value: 'gpt-3.5-turbo-16k',
connected: true
},
{
key: 'temperature',
value: 0,
connected: true
},
{
key: 'maxToken',
value: 8000,
connected: true
},
{
key: 'systemPrompt',
value: '知识库是关于 laf 的内容。',
connected: true
},
{
key: 'limitPrompt',
value:
'我的问题都是关于 laf 的。根据知识库回答我的问题,与 laf 无关问题,直接回复:“我不清楚,我仅能回答 laf 相关的问题。”。',
connected: true
},
{
key: 'switch',
connected: true
},
{
key: 'quoteQA',
connected: true
},
{
key: 'history',
connected: true
},
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'answerText',
targets: []
}
]
},
{
moduleId: 's4v9su',
position: {
x: 193.3803955457983,
y: 1116.251200765746
},
flowType: 'historyNode',
inputs: [
{
key: 'maxContext',
value: 2,
connected: true
},
{
key: 'history',
connected: true
}
],
outputs: [
{
key: 'history',
targets: [
{
moduleId: 'remuj3',
key: 'history'
}
]
}
]
},
{
moduleId: 'fljhzy',
position: {
x: 1305.5374262228029,
y: 1120.0404921820218
},
flowType: 'kbSearchNode',
inputs: [
{
key: 'kbList',
value: [],
connected: true
},
{
key: 'similarity',
value: 0.76,
connected: true
},
{
key: 'limit',
value: 5,
connected: true
},
{
key: 'switch',
connected: true
},
{
key: 'userChatInput',
connected: true
}
],
outputs: [
{
key: 'isEmpty',
targets: [
{
moduleId: 'tc90wz',
key: 'switch'
}
]
},
{
key: 'unEmpty',
targets: [
{
moduleId: 'nlfwkc',
key: 'switch'
}
]
},
{
key: 'quoteQA',
targets: [
{
moduleId: 'nlfwkc',
key: 'quoteQA'
}
]
}
]
},
{
moduleId: 'q9equb',
position: {
x: 191.4857498376603,
y: 856.6847387508401
},
flowType: 'userGuide',
inputs: [
{
key: 'welcomeText',
value:
'你好,我是 laf 助手,有什么可以帮助你的?\n[laf 是什么?有什么用?]\n[laf 在线体验地址]\n[官网地址是多少]',