mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
mtmd: Add another API example
This commit is contained in:
parent
9ec310d858
commit
c5340533c0
|
|
@ -77,7 +77,9 @@ curl http://127.0.0.1:5000/v1/chat/completions \
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Multimodal support (llama.cpp and ExLlamaV3)
|
#### Multimodal/vision (llama.cpp and ExLlamaV3)
|
||||||
|
|
||||||
|
##### /v1/chat/completions (recommended!)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl http://127.0.0.1:5000/v1/chat/completions \
|
curl http://127.0.0.1:5000/v1/chat/completions \
|
||||||
|
|
@ -87,7 +89,7 @@ curl http://127.0.0.1:5000/v1/chat/completions \
|
||||||
{
|
{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
"content": [
|
"content": [
|
||||||
{"type": "text", "text": "What color is this image?"},
|
{"type": "text", "text": "Please describe what you see in this image."},
|
||||||
{"type": "image_url", "image_url": {"url": "https://github.com/turboderp-org/exllamav3/blob/master/examples/media/cat.png?raw=true"}}
|
{"type": "image_url", "image_url": {"url": "https://github.com/turboderp-org/exllamav3/blob/master/examples/media/cat.png?raw=true"}}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -95,6 +97,38 @@ curl http://127.0.0.1:5000/v1/chat/completions \
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### /v1/completions
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl http://127.0.0.1:5000/v1/completions \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"text": "About image <__media__> and image <__media__>, what I can say is that the first one"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "image_url",
|
||||||
|
"image_url": {
|
||||||
|
"url": "https://github.com/turboderp-org/exllamav3/blob/master/examples/media/cat.png?raw=true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "image_url",
|
||||||
|
"image_url": {
|
||||||
|
"url": "https://github.com/turboderp-org/exllamav3/blob/master/examples/media/strawberry.png?raw=true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
#### SSE streaming
|
#### SSE streaming
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue