[Docs] release docs 2.3 (#4951)
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled

* [Docs] release docks 2.3

* modify dockerfiles

* fix bug
This commit is contained in:
ming1753
2025-11-11 15:30:11 +08:00
committed by GitHub
parent cba7b2912f
commit 38ccf9b00b
25 changed files with 2322 additions and 134 deletions
+82 -7
View File
@@ -4,13 +4,15 @@
思考模型在输出中返回 `reasoning_content` 字段,表示思考链内容,即得出最终结论的思考步骤.
##目前支持思考链的模型
| 模型名称 | 解析器名称 | 默认开启思考链 |
|---------------|-------------|---------|
| baidu/ERNIE-4.5-VL-424B-A47B-Paddle | ernie-45-vl | |
| baidu/ERNIE-4.5-VL-28B-A3B-Paddle | ernie-45-vl | |
## 目前支持思考链的模型
| 模型名称 | 解析器名称 | 默认开启思考链 | 工具调用 | 思考开关控制参数|
|---------------|-------------|---------|---------|--------- |
| baidu/ERNIE-4.5-VL-424B-A47B-Paddle | ernie-45-vl | | ❌ | "chat_template_kwargs":{"enable_thinking": true/false}|
| baidu/ERNIE-4.5-VL-28B-A3B-Paddle | ernie-45-vl | ✅ | ❌ |"chat_template_kwargs":{"enable_thinking": true/false}|
| baidu/ERNIE-4.5-21B-A3B-Thinking | ernie-x1 | ✅不支持关思考 | ✅|❌|
| baidu/ERNIE-4.5-VL-28B-A3B-Thinking | ernie-45-vl-thinking | ✅不推荐关闭 | ✅|"chat_template_kwargs": {"options": {"thinking_mode": "open/close"}}|
思考模型需要指定解析器,以便于对思考内容进行解析. 通过 `"enable_thinking": false` 参数可以关闭模型思考模式.
思考模型需要指定解析器,以便于对思考内容进行解析. 参考各个模型的 `思考开关控制参数` 可以关闭模型思考模式.
可以支持思考模式开关的接口:
1. OpenAI 服务中 `/v1/chat/completions` 请求.
@@ -33,7 +35,7 @@ python -m fastdeploy.entrypoints.openai.api_server \
--reasoning-parser ernie-45-vl
```
接下来, 向模型发送 `chat completion` 请求
接下来, 向模型发送 `chat completion` 请求`baidu/ERNIE-4.5-VL-28B-A3B-Paddle`模型为例
```bash
curl -X POST "http://0.0.0.0:8192/v1/chat/completions" \
@@ -83,3 +85,76 @@ for chunk in chat_response:
print("\n")
```
## 工具调用
如果模型支持工具调用, 可以同时启动模型回复内容的思考链解析 `reasoning_content` 及工具解析 `tool-call-parser`。 工具内容仅从模型回复内容 `content` 中进行解析,而不会影响思考链内容。
例如,
```bash
curl -X POST "http://0.0.0.0:8390/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "北京今天天气怎么样?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Determine weather in my location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"c",
"f"
]
}
},
"additionalProperties": false,
"required": [
"location",
"unit"
]
},
"strict": true
}
}],
"stream": false
}'
```
返回结果示例如下:
```json
{
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "",
"reasoning_content": "用户问的是..",
"tool_calls": [
{
"id": "chatcmpl-tool-311b9bda34274722afc654c55c8ce6a0",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"北京\", \"unit\": \"c\"}"
}
}
]
},
"finish_reason": "tool_calls"
}
]
}
```
更多工具调用相关的使用参考文档 [Tool Calling](./tool_calling.md)