[Docs] add docs of base64 or local file mm inputs (#5193)

This commit is contained in:
ApplEOFDiscord
2025-11-26 14:41:43 +08:00
committed by GitHub
parent fb0a2edc25
commit 287751f19d
4 changed files with 76 additions and 12 deletions

View File

@@ -65,7 +65,7 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
\
For image inputs:
```shell
@@ -80,7 +80,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
Image can also be provided through base64-encoded string:
```shell
{"type":"image_url", "image_url": {"url":"data:image/jpg;base64,this/is/an/example"}
```
or absolute path to local file:
```shell
{"type":"image_url", "image_url": {"url":"file:///this/is/an/example"}
```
\
For video inputs:
```shell
@@ -95,7 +103,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
Video can also be provided through base64-encoded string:
```shell
{"type":"video_url", "video_url": {"url":"data:video/mp4;base64,this/is/an/example"}
```
or absolute path to local file:
```shell
{"type":"video_url", "video_url": {"url":"file:///this/is/an/example"}
```
\
Input includes tool calls, send requests with the command below:
```shell

View File

@@ -72,7 +72,7 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
\
For image inputs:
```shell
@@ -87,7 +87,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
Image can also be provided through base64-encoded string:
```shell
{"type":"image_url", "image_url": {"url":"data:image/jpg;base64,this/is/an/example"}
```
or absolute path to local file:
```shell
{"type":"image_url", "image_url": {"url":"file:///this/is/an/example"}
```
\
For video inputs:
```shell
@@ -102,7 +110,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
Video can also be provided through base64-encoded string:
```shell
{"type":"video_url", "video_url": {"url":"data:video/mp4;base64,this/is/an/example"}
```
or absolute path to local file:
```shell
{"type":"video_url", "video_url": {"url":"file:///this/is/an/example"}
```
\
ERNIE-4.5-VL supports reasoning mode (enabled by default). Disable it as follows:
```shell

View File

@@ -62,7 +62,7 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
\
输入包含图片时,按如下命令发起请求
```shell
@@ -77,7 +77,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
图片url字段同样支持传入base64编码字符串:
```shell
{"type":"image_url", "image_url": {"url":"data:image/jpg;base64,this/is/an/example"}
```
或本地文件的绝对路径:
```shell
{"type":"image_url", "image_url": {"url":"file:///this/is/an/example"}
```
\
输入包含视频时,按如下命令发起请求
```shell
@@ -92,7 +100,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
视频url字段同样支持传入base64编码字符串:
```shell
{"type":"video_url", "video_url": {"url":"data:video/mp4;base64,this/is/an/example"}
```
或本地文件的绝对路径:
```shell
{"type":"video_url", "video_url": {"url":"file:///this/is/an/example"}
```
\
输入包含工具调用时,按如下命令发起请求
```shell

View File

@@ -69,7 +69,7 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
\
输入包含图片时,按如下命令发起请求
```shell
@@ -84,7 +84,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
图片url字段同样支持传入base64编码字符串:
```shell
{"type":"image_url", "image_url": {"url":"data:image/jpg;base64,this/is/an/example"}
```
或本地文件的绝对路径:
```shell
{"type":"image_url", "image_url": {"url":"file:///this/is/an/example"}
```
\
输入包含视频时,按如下命令发起请求
```shell
@@ -99,7 +107,15 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
]
}'
```
视频url字段同样支持传入base64编码字符串:
```shell
{"type":"video_url", "video_url": {"url":"data:video/mp4;base64,this/is/an/example"}
```
或本地文件的绝对路径:
```shell
{"type":"video_url", "video_url": {"url":"file:///this/is/an/example"}
```
\
当前ERNIE-4.5-VL模型支持思考模式且默认开启按如下命令可关闭思考模式
```shell