{
  "name": "Chat with local LLMs using n8n and Ollama",
  "nodes": [
    {
      "id": "475385fa-28f3-45c4-bd1a-10dde79f74f2",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        700,
        460
      ]
    },
    {
      "id": "61133dc6-dcd9-44ff-85f2-5d8cc2ce813e",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        900,
        680
      ]
    },
    {
      "id": "3e89571f-7c87-44c6-8cfd-4903d5e1cdc5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        80
      ],
      "parameters": {
        "width": 485,
        "height": 473,
        "content": "## Chat with local LLMs using n8n and Ollama\nThis n8n workflow allows you to seamlessly interact with your self-hosted Large Language Models (LLMs) through a user-friendly chat interface. By connectin"
      }
    },
    {
      "id": "9345cadf-a72e-4d3d-b9f0-d670744065fe",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        660
      ],
      "parameters": {
        "width": 368,
        "height": 258,
        "content": "## Ollama setup\n* Connect to your local Ollama, usually on http://localhost:11434\n* If running in Docker, make sure that the n8n container has access to the host's network in order to connect to Ollam"
      }
    },
    {
      "id": "eeffdd4e-6795-4ebc-84f7-87b5ac4167d9",
      "name": "Chat LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        920,
        460
      ]
    }
  ],
  "connections": {
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Chat LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Chat LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}