json: cannot unmarshal object into Go struct field ChatRequest.format of type string (status code: 400) #206

Closed
opened 2026-02-15 16:28:44 -05:00 by yindo · 2 comments
Owner

Originally created by @tusharad on GitHub (Jan 23, 2025).

Getting below error upon running example from here
Image

$ ollama --version
ollama version is 0.4.0

OS : Ubuntu 22.04.05
Python version: Python 3.10.12

pip3 list:

ollama            0.4.7
pip               22.0.2
pydantic          2.10.5
pydantic_core     2.27.2
Originally created by @tusharad on GitHub (Jan 23, 2025). Getting below error upon running example from [here](https://github.com/ollama/ollama-python/blob/main/examples/structured-outputs.py) ![Image](https://github.com/user-attachments/assets/a4ea62c4-98d4-4942-acc2-b851c285e4a6) ``` $ ollama --version ollama version is 0.4.0 ``` OS : Ubuntu 22.04.05 Python version: Python 3.10.12 pip3 list: ``` ollama 0.4.7 pip 22.0.2 pydantic 2.10.5 pydantic_core 2.27.2 ```
yindo closed this issue 2026-02-15 16:28:44 -05:00
Author
Owner

@tendermonster commented on GitHub (Feb 2, 2025):

did you solve it ?

@tendermonster commented on GitHub (Feb 2, 2025): did you solve it ?
Author
Owner

@tusharad commented on GitHub (Feb 2, 2025):

Yes. I was using older version of ollama. My bad

@tusharad commented on GitHub (Feb 2, 2025): Yes. I was using older version of ollama. My bad
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#206