Curl Chat Client For Multimodal#
Refer to the trtllm-serve documentation for starting a server.
Source NVIDIA/TensorRT-LLM.
1#! /usr/bin/env bash
2
3# Single image inference
4curl http://localhost:8000/v1/chat/completions \
5 -H "Content-Type: application/json" \
6 -d '{
7 "model": "Qwen2-VL-7B-Instruct",
8 "messages":[{
9 "role": "system",
10 "content": "You are a helpful assistant."
11 }, {
12 "role": "user",
13 "content": [
14 {
15 "type": "text",
16 "text": "Describe the natural environment in the image."
17 },
18 {
19 "type":"image_url",
20 "image_url": {
21 "url": "https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/seashore.png"
22 }
23 }
24 ]
25 }],
26 "max_tokens": 64,
27 "temperature": 0
28 }'