Gemma 3 4b ビジョン

Model

カスタム - 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