代码提交
This commit is contained in:
1 parent
4ac7bc21cd
commit
17cf849361
110 files changed
+17007
-518
No files matched your search
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "agent_1",
|
||||
"type": "agent",
|
||||
"name": "智能体",
|
||||
"config": {
|
||||
"agentId": "report-writer",
|
||||
"promptTemplate": "根据材料撰写:{{ nodes.merge_1.data }}",
|
||||
"responseMode": "text",
|
||||
"threadMode": "isolated_per_node",
|
||||
"timeoutSeconds": 600,
|
||||
"skillNames": []
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "code_1",
|
||||
"type": "code",
|
||||
"name": "代码(沙箱)",
|
||||
"config": {
|
||||
"language": "python",
|
||||
"source": "def main(inputs):\n rows = inputs.get(\"rows\") or []\n return {\"count\": len(rows), \"titles\": [r.get(\"title\") for r in rows[:10]]}\n",
|
||||
"timeoutSeconds": 60,
|
||||
"allowNetwork": false
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "cond_1",
|
||||
"type": "condition",
|
||||
"name": "条件",
|
||||
"config": {
|
||||
"branches": [
|
||||
{
|
||||
"name": "passed",
|
||||
"expression": "{{ nodes.agent_review.data.passed }} == true"
|
||||
},
|
||||
{
|
||||
"name": "rejected",
|
||||
"expression": "{{ nodes.agent_review.data.passed }} == false"
|
||||
}
|
||||
],
|
||||
"defaultBranch": "rejected"
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"id": "http_1",
|
||||
"type": "http",
|
||||
"name": "HTTP",
|
||||
"config": {
|
||||
"method": "GET",
|
||||
"url": "https://api.example.internal/items/{{ inputs.taskId }}",
|
||||
"headers": { "Accept": "application/json" },
|
||||
"query": {},
|
||||
"body": null,
|
||||
"credentialRef": "cred_task_api",
|
||||
"timeoutSeconds": 30,
|
||||
"maxResponseBytes": 1048576,
|
||||
"allowRedirects": false
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"id": "human_1",
|
||||
"type": "human_input",
|
||||
"name": "人工介入",
|
||||
"config": {
|
||||
"formSchema": {
|
||||
"type": "object",
|
||||
"required": ["decision"],
|
||||
"properties": {
|
||||
"decision": {
|
||||
"type": "string",
|
||||
"enum": ["approve", "revise"]
|
||||
},
|
||||
"comment": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"prompt": "请确认是否放行当前报告草稿。",
|
||||
"actions": ["approve", "revise"]
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "loop_1",
|
||||
"type": "loop",
|
||||
"name": "受限循环",
|
||||
"config": {
|
||||
"maxIterations": 2,
|
||||
"continueWhen": "{{ nodes.agent_review.data.passed }} == false",
|
||||
"bodyEntry": "agent_write"
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "merge_1",
|
||||
"type": "merge",
|
||||
"name": "合并",
|
||||
"config": {
|
||||
"strategy": "all",
|
||||
"sources": ["sql_1", "http_1", "agent_collect"]
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "output_1",
|
||||
"type": "output",
|
||||
"name": "输出",
|
||||
"config": {
|
||||
"mapping": {
|
||||
"reportMarkdown": "{{ nodes.agent_write.data.answer }}"
|
||||
},
|
||||
"llmRepair": false
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "skill_1",
|
||||
"type": "skill",
|
||||
"name": "技能(agent_skill)",
|
||||
"config": {
|
||||
"mode": "agent_skill",
|
||||
"agentId": "report-collector",
|
||||
"skillNames": ["web-research"],
|
||||
"promptTemplate": "使用指定技能完成:{{ inputs.topic }}",
|
||||
"timeoutSeconds": 300
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "sql_1",
|
||||
"type": "sql_read",
|
||||
"name": "SQL 只读",
|
||||
"config": {
|
||||
"dataSourceId": "ds_report_readonly",
|
||||
"statement": "SELECT id, title FROM report_source WHERE task_id = :task_id",
|
||||
"parameters": {
|
||||
"task_id": "{{ inputs.taskId }}"
|
||||
},
|
||||
"maxRows": 1000
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"id": "start_1",
|
||||
"type": "start",
|
||||
"name": "开始",
|
||||
"config": {}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"id": "sub_1",
|
||||
"type": "subworkflow",
|
||||
"name": "子工作流",
|
||||
"config": {
|
||||
"workflowId": "wf_collect_pack",
|
||||
"versionId": "wv_01",
|
||||
"inputMapping": {
|
||||
"topic": "{{ inputs.topic }}",
|
||||
"taskId": "{{ inputs.taskId }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"id": "transform_1",
|
||||
"type": "transform",
|
||||
"name": "模板/转换",
|
||||
"config": {
|
||||
"operations": [
|
||||
{
|
||||
"op": "map",
|
||||
"from": "{{ nodes.sql_1.data.rows }}",
|
||||
"to": "rows"
|
||||
},
|
||||
{
|
||||
"op": "template",
|
||||
"template": "# {{ inputs.topic }}\n\n共 {{ nodes.sql_1.metadata.rowCount }} 行。",
|
||||
"to": "markdown"
|
||||
}
|
||||
],
|
||||
"template": null
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user