diff --git a/docs/12 - OpenAI API.md b/docs/12 - OpenAI API.md index fc76cd8b..5dc98a51 100644 --- a/docs/12 - OpenAI API.md +++ b/docs/12 - OpenAI API.md @@ -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 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", "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"}} ] } @@ -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 ```shell