lemonai icon indicating copy to clipboard operation
lemonai copied to clipboard

Ollama Connection Issue.

Open MarkBryant-87 opened this issue 1 year ago • 5 comments

Hey, When I try to connect Lemon AI to Ollama, I get this error when I send a query inside the app:

Task Error:Planning failed: parseJSON failed: Unexpected token 'E', "ECONNREFUSED" is not valid JSON

I tried to change the URL Endpoints to:

http://localhost:11434/api/chat#
http://localhost:11434/api/generate#
http://127.0.0.1:11434/api/chat#
http://127.0.0.1:11434/api/generate#

And here's my Ollama model setup:

Model ID: gemma3:4b (I tried the real Model ID from ollama settings as well, didn't work.)
Model Name: gemma3:4b
Model Group: Google
Model Type: Vision, Tool.

When I tried to use it via Deepseek API, It worked, So I'm assuming the problem is with the Ollama connection setup. Any Ideas or any solution to solve my problem?

MarkBryant-87 avatar Jun 02 '25 18:06 MarkBryant-87

Similar issue, maybe: after configuring a model in Ollama - though "check" failed as noted in #25 - and trying to run a task, I see in the console output an error about the container not existing even though it is running.

Image

kumanday avatar Jun 08 '25 23:06 kumanday

#25 Please accept our apologies; we're working on resolving this issue. In the meantime, you can find a workaround in a separate issue.

HexdoAI avatar Jun 09 '25 08:06 HexdoAI

We have support the Ollama in the latest version. Please update the docker and application first.

You could try this address for ollama : http://host.docker.internal:11434/v1

Remember to save the config by click the button right-top.

bboonnee avatar Jun 09 '25 09:06 bboonnee

ignore the "Check" Ollama model's error message . Try the dialog task running.

bboonnee avatar Jun 09 '25 09:06 bboonnee

SOLVED!

Using : http://host.docker.internal:11434/v1 as the url endpoint of the ollama, The problem is now solved.

Thanks @bboonnee

MarkBryant-87 avatar Jun 09 '25 21:06 MarkBryant-87