Issues connecting Ollama llama3 model with AI Agent

Hi @Blessing

Ollama is setup properly

Ollama is running Locally with no issues

PS C:\WINDOWS\system32> ollama run llama3
>>> hello
Hello! It's nice to meet you. Is there something I can help you with, or would you like to chat?

>>> Send a message (/? for help)

I have verified that the n8n container can communicate with Ollama and receive a successful response by executing a command directly from within the container. Since Ollama responded correctly, we can rule out any network connectivity issues between the Docker container and the Ollama LLM.

PS C:\WINDOWS\system32> docker exec -it local-files-n8n-1 wget -O- --post-data='{\"model\": \"llama3\", \"prompt\": \"Hi can you hear me\", \"stream\": false}' http://192.168.1.65:11434/api/generate
Connecting to 192.168.1.65:11434 (192.168.1.65:11434)
writing to stdout
{"model":"llama3","created_at":"2026-04-07T16:49:03.5861251Z","response":"Hello! Yes, I can hear you. I'm an AI assistant trained to understand and respond to human language, so feel free to chat with me anytime. What's on your mind?","done":true,"done_reason":"stop","context":[128006,882,128007,271,13347,649,499,6865,757,128009,128006,78191,128007,271,9906,0,7566,11,358,649,6865,499,13,358,2846,459,15592,18328,16572,311,3619,323,6013,311,3823,4221,11,779,2733,1949,311,6369,449,757,30194,13,3639,596,389,701,4059,30],"total_duration":243445620-                    100% |**********************************************************************************************************************************************************************************************************************************|   674  0:00:00 ETA
written to stdout
PS C:\WINDOWS\system32>

I have created a basic workflow (chat trigger, AI Agent and Ollama model), but still getting the same error ”Error: Failed to receive response” when entering a message in the chat.

Another test I ran was to establish a test message in the chat trigger and the workflow completed successfully even with the red asterik, is there any reason about why entering a message in the Test chat is not working?