{
  "id": "WkSensitiveChk03",
  "name": "\u6aa2\u67e5\u793e\u7fa4\u8cbc\u6587\u654f\u611f\u5b57 (Sensitive Word Checker \u00b7 \u672c\u6a5f Ollama)",
  "nodes": [
    {
      "parameters": {},
      "id": "node-manual",
      "name": "When clicking Execute",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        400
      ]
    },
    {
      "parameters": {
        "jsCode": "const postText = '\uff08\u628a\u9019\u88e1\u63db\u6210\u4f60\u8981\u6aa2\u67e5\u7684\u8cbc\u6587\u8349\u7a3f\uff09';\nconst prompt = '\u4f60\u662f\u53f0\u7063\u5ee3\u544a\u6cd5\u898f\u8207\u793e\u7fa4\u5408\u898f\u5be9\u67e5\u54e1\u3002\u6aa2\u67e5\u4ee5\u4e0b\u8cbc\u6587\u662f\u5426\u6709\u6613\u9055\u898f\u6216\u8a87\u5927\u5b57\u773c\uff1a\u7d55\u5c0d\u5316\u7528\u8a5e\uff08\u6700\u3001\u7b2c\u4e00\u3001No.1\u3001\u552f\u4e00\u3001\u9802\u7d1a\u3001100%\u3001\u6c38\u4e45\uff09\u3001\u7642\u6548\u6216\u91ab\u7642\u5ba3\u7a31\u3001\u5feb\u901f\u7626\u8eab\u6697\u793a\u3001\u8a87\u5927\u4e0d\u5be6\u3002\\n\u9010\u689d\u5217\u51fa\uff1a\u554f\u984c\u5b57 \u2192 \u98a8\u96aa\u539f\u56e0 \u2192 \u5efa\u8b70\u6539\u6cd5\u3002\u82e5\u5b8c\u5168\u6c92\u554f\u984c\uff0c\u56de\u8986\u300c\u2705 \u6c92\u6709\u767c\u73fe\u660e\u986f\u98a8\u96aa\u5b57\u8a5e\u300d\u3002\u7528\u7e41\u9ad4\u4e2d\u6587\u3002\\n\\n\u8cbc\u6587\uff1a\\n' + postText;\nreturn [{ json: { postText, prompt } }];"
      },
      "id": "node-input",
      "name": "Input (edit me)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        400
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:11434/api/chat",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: 'qwen2.5:latest', messages: [ { role: 'system', content: '\u4f60\u662f\u53f0\u7063\u4eba\uff0c\u4e00\u5f8b\u4f7f\u7528\u53f0\u7063\u7e41\u9ad4\u4e2d\u6587\u8207\u53f0\u7063\u6163\u7528\u8a9e\u56de\u8986\uff0c\u7d55\u5c0d\u4e0d\u8981\u51fa\u73fe\u4efb\u4f55\u7c21\u9ad4\u5b57\u6216\u4e2d\u570b\u7528\u8a9e\u3002' }, { role: 'user', content: $json.prompt } ], stream: false }) }}",
        "options": {
          "timeout": 180000
        }
      },
      "id": "node-ollama",
      "name": "Summarize with Ollama",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        400
      ]
    },
    {
      "parameters": {
        "jsCode": "const data = $input.first().json;\nlet out = '';\ntry { out = (data.message && data.message.content) || (data.content && data.content[0] && data.content[0].text) || data.response || ''; } catch (e) {}\nif (!out) out = JSON.stringify(data);\nreturn [{ json: { result: out } }];"
      },
      "id": "node-result",
      "name": "Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        400
      ]
    }
  ],
  "connections": {
    "When clicking Execute": {
      "main": [
        [
          {
            "node": "Input (edit me)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input (edit me)": {
      "main": [
        [
          {
            "node": "Summarize with Ollama",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize with Ollama": {
      "main": [
        [
          {
            "node": "Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}