⚒️ Chat with local LLMs using n8n and Ollama

186,162 views · ⚒️ Engineering

Description

Chat with local LLMs using n8n and Ollama

This n8n workflow allows you to seamlessly interact with your self-hosted Large Language Models (LLMs) through a user-friendly chat interface. By connecting to Ollama, a powerful tool for managing local LLMs, you can send prompts and receive AI-generated responses directly within n8n.

Use cases

How it works

  1. When chat message received: Captures the user’s input from the chat interface.
  2. Chat LLM Chain: Sends the input to the Ollama server and receives the AI-generated response.
  3. Delivers the LLM’s response back to the chat interface.

Set up steps

🔗 Nodes Used

Basic LLM Chain, Ollama Chat Model, Chat Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup