{
  "id": "aihSupportDocs",
  "name": "AIHotple - document support answer checks",
  "active": false,
  "nodes": [
    {
      "id": "start",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "parameters": {},
      "position": [
        0,
        0
      ]
    },
    {
      "id": "questions-to-check",
      "name": "Questions to check",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "parameters": {
        "jsCode": "return [{\"question\":\"Can opened products be returned?\"},{\"question\":\"What is the minimum order for free shipping?\"},{\"question\":\"What are the email support hours?\"},{\"question\":\"Who won the football tournament?\"},{\"question\":\"What is the return window?\",\"conflict\":true}].map(json=>({json}));"
      },
      "position": [
        220,
        0
      ]
    },
    {
      "id": "retrieve-and-draft",
      "name": "Retrieve and draft",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "parameters": {
        "url": "http://127.0.0.1:5693/answer",
        "method": "POST",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{$json}}",
        "options": {
          "timeout": 240000
        }
      },
      "position": [
        440,
        0
      ]
    },
    {
      "id": "inspect-answer-and-source",
      "name": "Inspect answer and source",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "parameters": {
        "jsCode": "return $input.all().map(x=>({json:{question:x.json.question,status:x.json.status,answer:x.json.answer,reason:x.json.reason,sources:x.json.sources,modelCalled:x.json.modelCalled,raw_model_output:x.json.raw_model_output||null}}));"
      },
      "position": [
        660,
        0
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Questions to check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Questions to check": {
      "main": [
        [
          {
            "node": "Retrieve and draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve and draft": {
      "main": [
        [
          {
            "node": "Inspect answer and source",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}