mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[Docs] add docs of base64 or local file mm inputs (#5193)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user