Gemma 3 4b 视觉

模型

自定义 - HTTP POST

URL:

  • http://127.0.0.1:1234/v1/chat/completions

内容类型:

  • application/json

请求头:

  • {}

请求体:

{
  "model": "nanonets-ocr-s",
  "messages": [
    {
      "role": "system", "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": [        
        {
          "type": "image_url",
          "image_url": {
            "url": "data:image/jpeg;base64,$IMAGE_BASE64"
          }
        },
        { 
          "type": "text", 
          "text": "从上方图像中提取文本,像自然阅读一样。仅返回有效单词和完整句子。"
        }
      ]
    }
  ],
  "stream": false
}

响应类型:

  • JSON

响应查询:

  • choices[0].message.content