{
  "nodes": [
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "id": "1",
      "name": "Trigger",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "return [\n  {\n    json: {\n      topic: \"The Future of Renewable Energy\"\n    }\n  }\n];"
      },
      "id": "2",
      "name": "Set Blog Topic",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        400,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "http://localhost:11434/api/generate",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "={\n  \"model\": \"llama3\",\n  \"prompt\": \"Research and write a blog post about the following topic: {{$json[\"topic\"]}}. Include a title, an introduction, 3 body paragraphs, and a conclusion.\",\n  \"stream\": false\n}"
      },
      "id": "3",
      "name": "Ask LLaMA 3 (Blog Writer)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const response = JSON.parse(items[0].json.body);\nreturn [\n  {\n    json: {\n      blog_post: response.response\n    }\n  }\n];"
      },
      "id": "4",
      "name": "Extract Blog Post",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    }
  ],
  "connections": {
    "Trigger": {
      "main": [
        [
          {
            "node": "Set Blog Topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Blog Topic": {
      "main": [
        [
          {
            "node": "Ask LLaMA 3 (Blog Writer)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask LLaMA 3 (Blog Writer)": {
      "main": [
        [
          {
            "node": "Extract Blog Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "name": "LLaMA 3 Blog Writing Agent",
  "active": false,
  "settings": {},
  "version": 1
}
