feat: Integrate and serve the WebUI, including Vercel build configuration and Python routes for static files.

This commit is contained in:
CJACK
2026-02-01 16:43:52 +08:00
parent 9956770cb0
commit b17e492ab8
6 changed files with 105 additions and 9 deletions

50
API.md
View File

@@ -49,6 +49,8 @@ Content-Type: application/json
| `stream` | boolean | ❌ | 是否流式输出,默认 `false` |
| `temperature` | number | ❌ | 温度参数0-2 |
| `max_tokens` | number | ❌ | 最大输出 token 数 |
| `tools` | array | ❌ | 工具定义列表OpenAI 格式) |
| `tool_choice` | string | ❌ | 工具选择策略 |
**支持的模型**:
@@ -111,6 +113,54 @@ data: [DONE]
}
```
**工具调用请求示例**:
```json
{
"model": "deepseek-chat",
"messages": [{"role": "user", "content": "北京今天天气怎么样?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "获取指定城市的天气",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "城市名称"}
},
"required": ["location"]
}
}
}]
}
```
**工具调用响应格式**:
```json
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"tool_calls": [{
"id": "call_xxx",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"北京\"}"
}
}]
},
"finish_reason": "tool_calls"
}]
}
```
---
## 管理接口