Ollama missing format option

Hi,

I am running latest version of N8N and paying around with LLM Chains. I tied out Ollama but I miss an option to define format=json so that Ollama only returns a single not nested JSON file.

Is there a way to do that or do you know if there are plans to add this feature?

Thank you!

Kind regards,

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @n8n_noob

Thanks for posting here and welcome to the community! :partying_face:

Could you be a bit more specific about the nodes you have been using and your n8n setup? You can also share your workflow here by pasting them as JSON in between two block quotes (```).

I have checked both Ollama Nodes and both have the option to return the output as JSON.

Hi Ria,

thank you for your reply. I am on N8N Version 1.46.0 currently.

When I open an Ollama Chat Model there is no Option for JSON:

There is only an option in Basic LLM Chain where I connect it to specify an format but that is not the format-option for Ollama but so parse and repair invalid json.

What version is your screenshot from, maybe I have to downgrade?

Thank you!

Kind regards,

Hi @n8n_noob

Just upgraded to 1.46 to test. And it’s there…
Sorry but, did you try to scroll in the drop-down list that you’re getting? :see_no_evil: It’s at the very bottom…

1 Like

:rofl: :joy: :see_no_evil:

You are right! Thank you! I was not able to see one can scroll.

So now I can proceed. Thank you very much for that hint!

Kind regards,

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.