[GH-ISSUE #8515] Missing the "schema" option for Structured Output generation #53817

Closed
opened 2026-05-05 15:23:30 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @HunorModli on GitHub (Jan 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8515

Hi,

I am trying to use the ollama structured output generation (ollama added it on 6.th of december), that was announced in the [0.5.0] - 2024-12-25 version:

Structured Output for Ollama: Pass structured data output directly to Ollama, unlocking new possibilities for streamlined automation and precise data handling.

I did not find the exact way to get a structured response in the documentation, but after updateing OpenWebUi, there is only one setting I found that looks like what I'm searching for: it is under Settings > General > Advanced Parameters > Request Mode (all the way at the bottom). If I switch it to "JSON", I think if somewhere this hsould be the option, but after selecting this the generation fails with a 400 error like this:

400: 1 validation error for GenerateChatCompletionForm
format
Input should be a valid dictionary [type=dict_type, input_value='json', input_type=str]
For further information visit https://errors.pydantic.dev/2.9/v/dict_type

Am I missing something, or is this option missing from the user interface? If I'm wrong can someone point me to the right direction?

Thanks!

Originally created by @HunorModli on GitHub (Jan 13, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8515 Hi, I am trying to use the ollama structured output generation (ollama added it on 6.th of december), that was announced in the [0.5.0] - 2024-12-25 version: > ✅ Structured Output for Ollama: Pass structured data output directly to Ollama, unlocking new possibilities for streamlined automation and precise data handling. I did not find the exact way to get a structured response in the documentation, but after updateing OpenWebUi, there is only one setting I found that looks like what I'm searching for: it is under Settings > General > Advanced Parameters > Request Mode (all the way at the bottom). If I switch it to "JSON", I think if somewhere this hsould be the option, but after selecting this the generation fails with a 400 error like this: > 400: 1 validation error for GenerateChatCompletionForm > format > Input should be a valid dictionary [type=dict_type, input_value='json', input_type=str] > For further information visit https://errors.pydantic.dev/2.9/v/dict_type Am I missing something, or is this option missing from the user interface? If I'm wrong can someone point me to the right direction? Thanks!
Author
Owner

@tjbck commented on GitHub (Mar 28, 2025):

Addressed in dev c137d3ad17, testing wanted here.

Image

<!-- gh-comment-id:2760090517 --> @tjbck commented on GitHub (Mar 28, 2025): Addressed in dev c137d3ad17dcfb5d0bc1959e1d761df3103fd86f, testing wanted here. ![Image](https://github.com/user-attachments/assets/9ea18643-5f90-4652-b182-b4baa11ebfff)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#53817