This commit is contained in:
V-LiuShuang committed 2026-09-20 14:54:37 +08:00
1 parent eee6640952
commit 32adcaaa48
2 files changed
+324 -18

No files matched your search

+46 -18
View File
@@ -35,17 +35,9 @@
| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `sessionId` | String | ✅ | 会话 ID;同一用户不同会话相互隔离 |
| `userId` | String | ✅ | 用户 ID;用于智能体命名空间隔离 / 会话路由 |
| `username` | String | ✅ | 用户名;用于智能体命名空间隔离 / 会话路由 |
| `input` | String | ✅ | 用户输入内容 |
| `chatModel` | Object | ❌ | 聊天模型配置(`name`、`stream`、`temperature`) |
`chatModel` 结构:
| 字段 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `name` | String | - | 模型名称,如 `gpt-oss-120b` |
| `stream` | Boolean | `true` | 是否流式 |
| `temperature` | Double | `0.2` | 温度 |
| `confirmResults` | Array | ❌| (HITL)当工具需要用户确认时,提交用户确认结果,Agent将继续执行|
### 2.3 请求示例
@@ -56,14 +48,50 @@ Content-Type: application/json
Accept: text/event-stream
{
"sessionId": "sess-20260918-001",
"userId": "user-10001",
"input": "帮我梳理今天的任务清单,生成一份 markdown 并保存到工作区",
"chatModel": {
"name": "gpt-oss-120b",
"stream": true,
"temperature": 0.2
}
"sessionId": "1872639000000000001",
"username": "zhangsan",
"input": "你好,帮我查询一下上个月的销售数据并生成报表。",
"confirmResults": [
{
"confirmed": true,
"toolCall": {
"id": "call_001",
"name": "query_sales_data",
"input": {
"month": "2026-08"
},
"content": null,
"metadata": {},
"state": "submitted"
},
"rules": [
{
"tool_name": "query_sales_data",
"rule_content": "month=2026-08",
"behavior": "allow",
"source": "userSettings"
},
{
"tool_name": "export_report",
"rule_content": null,
"behavior": "deny",
"source": "userSettings"
},
{
"tool_name": "delete_record",
"rule_content": null,
"behavior": "ask",
"source": "userSettings"
},
{
"tool_name": "send_mail",
"rule_content": "to=*",
"behavior": "passthrough",
"source": "userSettings"
}
]
}
]
}
```