{
  "openruna_format": "flow-graph-v1",
  "title": "Dynamically switch between LLMs Template",
  "slug": "dynamically-switch-between-llms-template",
  "source_filename": "1838_Noop_Stickynote_Automation_Triggered.json",
  "nodes": [
    {
      "id": "When chat message received",
      "name": "When chat message received",
      "integration": "@n8n/n8n-nodes-langchain.chat",
      "kind": "trigger"
    },
    {
      "id": "Switch Model",
      "name": "Switch Model",
      "integration": "@n8n/n8n-nodes-langchain.code",
      "kind": "action"
    },
    {
      "id": "Set LLM index",
      "name": "Set LLM index",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Increase LLM index",
      "name": "Increase LLM index",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "No Operation, do nothing",
      "name": "No Operation, do nothing",
      "integration": "noOp",
      "kind": "logic"
    },
    {
      "id": "Check for expected error",
      "name": "Check for expected error",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Loop finished without results",
      "name": "Loop finished without results",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Unexpected error",
      "name": "Unexpected error",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Return result",
      "name": "Return result",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "OpenAI 4o-mini",
      "name": "OpenAI 4o-mini",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "OpenAI 4o",
      "name": "OpenAI 4o",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "OpenAI o1",
      "name": "OpenAI o1",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "OpenAI Chat Model",
      "name": "OpenAI Chat Model",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Validate response",
      "name": "Validate response",
      "integration": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "kind": "action"
    },
    {
      "id": "Generate response",
      "name": "Generate response",
      "integration": "@n8n/n8n-nodes-langchain.chainLlm",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "Set LLM index",
      "to": "Generate response"
    },
    {
      "from": "Generate response",
      "to": "Validate response"
    },
    {
      "from": "Generate response",
      "to": "Check for expected error"
    },
    {
      "from": "Validate response",
      "to": "Return result"
    },
    {
      "from": "Validate response",
      "to": "Increase LLM index"
    },
    {
      "from": "Increase LLM index",
      "to": "No Operation, do nothing"
    },
    {
      "from": "Check for expected error",
      "to": "Loop finished without results"
    },
    {
      "from": "Check for expected error",
      "to": "Unexpected error"
    },
    {
      "from": "No Operation, do nothing",
      "to": "Set LLM index"
    },
    {
      "from": "When chat message received",
      "to": "Set LLM index"
    }
  ]
}