Update nexus wiki content

This commit is contained in:
2026-05-03 05:42:06 +08:00
parent 90f3811b83
commit 111bc65b7b
707 changed files with 32306 additions and 7289 deletions

View File

@@ -0,0 +1,44 @@
---
title: "HTTP-ChatCompletions"
type: concept
tags: []
---
## Definition
HTTP-ChatCompletions 是通过 HTTP 协议调用 AI 模型 Chat Completions 接口的模式,是 [[OpenAI-Compatible-API]] 的底层传输机制。
## Architecture
```
Client (n8n HTTP Request)
POST /v1/chat/completions
Content-Type: application/json
Authorization: Bearer <token>
{
"model": "openclaw:main",
"messages": [...]
}
AI Gateway (OpenClaw Gateway)
Agent Response
```
## Key Fields
- `model`:指定要调用的 Agent ID
- `messages`:对话历史,格式为 `[{role, content}]`
- `Authorization`Bearer Token 认证
## 与 WebSocket 的区别
- HTTP同步请求-响应,适合 n8n 等工作流工具
- WebSocket长连接双向通信适合实时对话界面
## Related
- [[OpenAI-Compatible-API]] 依赖此机制
- [[OpenClaw]] Gateway 提供此端点
- [[n8n]] 通过 HTTP Request 节点调用