I have deployed deployed paligemma-3b-mix-448 using:
swift deploy --model_type paligemma-3b-mix-448
On calling the completions API using curl:
curl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "paligemma-3b-mix-448", "messages": [{"role": "user", "content": "Picture 1:<img>https://modelscope-open.oss-cn-hangzhou.aliyuncs.com/images/rose.jpg</img>\nWhat kind of flower is in the picture and how many are there?"}], "max_tokens": 256, "temperature": 0 }'
I am getting the following error in output:
{"message":"The chat templatepaligemmacorresponding to the modelpaligemma-3b-mix-448is in text generation format. Please use thecompletionsAPI.","object":"error"}
What do I need to modify? Can I get a sample OpenAI API format request which works for paligemma(specifically paligemma-3b-mix-448) model?
I have deployed deployed paligemma-3b-mix-448 using:
swift deploy --model_type paligemma-3b-mix-448
On calling the completions API using curl:
curl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "paligemma-3b-mix-448", "messages": [{"role": "user", "content": "Picture 1:<img>https://modelscope-open.oss-cn-hangzhou.aliyuncs.com/images/rose.jpg</img>\nWhat kind of flower is in the picture and how many are there?"}], "max_tokens": 256, "temperature": 0 }'
or
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "paligemma-3b-mix-448", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "caption" }, { "type": "image_url", "image_url": { "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" } } ] } ] }'
I am getting the following error in output:
{"message":"The chat template
paligemmacorresponding to the model
paligemma-3b-mix-448is in text generation format. Please use the
completionsAPI.","object":"error"}
What do I need to modify? Can I get a sample OpenAI API format request which works for paligemma(specifically paligemma-3b-mix-448) model?