[GH-ISSUE #5861] Llava embeddings: string into Go value of type api.EmbeddingRequest #3653

Closed
opened 2026-04-12 14:26:31 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ndanielsen on GitHub (Jul 22, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5861

What is the issue?

I'm trying to get embeddings from the Llava34b model via this code, but get a go error:

    payload = json.dumps({
        "model": "llava:34b",
        "prompt": f"{system_prompt}\n\nHuman: {user_prompt}",
        "stream": False,
        "images": [base64_image]
    })

    # Set the headers
    headers = {
        'Content-Type': 'application/json'
    }

response = requests.post("http://192.168.1.17:6006/api/embeddings", json=payload)

returns this:

Error: 400 - {"error":"json: cannot unmarshal string into Go value of type api.EmbeddingRequest"}

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

v0.2.7

Originally created by @ndanielsen on GitHub (Jul 22, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5861 ### What is the issue? I'm trying to get embeddings from the Llava34b model via this code, but get a go error: ``` payload = json.dumps({ "model": "llava:34b", "prompt": f"{system_prompt}\n\nHuman: {user_prompt}", "stream": False, "images": [base64_image] }) # Set the headers headers = { 'Content-Type': 'application/json' } response = requests.post("http://192.168.1.17:6006/api/embeddings", json=payload) ``` returns this: Error: 400 - {"error":"json: cannot unmarshal string into Go value of type api.EmbeddingRequest"} ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version v0.2.7
GiteaMirror added the bug label 2026-04-12 14:26:31 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 22, 2024):

ollama doesn't currently support embeddings for images: https://github.com/ollama/ollama/issues/5304

<!-- gh-comment-id:2243929449 --> @rick-github commented on GitHub (Jul 22, 2024): ollama doesn't currently support embeddings for images: https://github.com/ollama/ollama/issues/5304
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3653