{
  "name": "Image Captioning",
  "nodes": [
    {
      "parameters": {
        "content": "Placeholder for Image Captioning",
        "height": 530,
        "width": 1100,
        "color": 5
      },
      "id": "9a206202-bc5e-4588-9adb-e4ca5d48e1a6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        -240
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "image-captioning"
      },
      "id": "bff18d10-12e1-45f2-b39a-df5d164fd3d4",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -300,
        0
      ]
    },
    {
      "parameters": {
        "chunkSize": 400,
        "chunkOverlap": 40
      },
      "id": "3076023c-1a26-420d-864b-e14f5091d527",
      "name": "Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        -130,
        0
      ]
    },
    {
      "parameters": {
        "model": "text-embedding-3-small",
        "options": {}
      },
      "id": "6acf18f8-c2ba-4df5-a60d-75c172c5b08b",
      "name": "Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1,
      "position": [
        70,
        0
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "options": {},
        "indexName": "image_captioning"
      },
      "id": "8ec51a4a-d020-4361-9060-bca80e88dd06",
      "name": "Weaviate Insert",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreWeaviate",
      "typeVersion": 1,
      "position": [
        270,
        0
      ],
      "credentials": {
        "weaviateApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "indexName": "image_captioning"
      },
      "id": "1a627070-4508-484d-b764-17d209de934f",
      "name": "Weaviate Query",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreWeaviate",
      "typeVersion": 1,
      "position": [
        270,
        -180
      ],
      "credentials": {
        "weaviateApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "name": "Weaviate",
        "description": "Vector context"
      },
      "id": "4bcad010-f1e4-4ac2-a626-25977d81b7ab",
      "name": "Vector Tool",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        450,
        -180
      ]
    },
    {
      "parameters": {},
      "id": "f74b32f7-9f59-47bd-b835-cfa567c04ec3",
      "name": "Window Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        450,
        -40
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "fe00cb21-88c5-4c7a-b187-54db43d4de59",
      "name": "Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1,
      "position": [
        450,
        -340
      ],
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Handle data",
        "options": {
          "systemMessage": "You are an assistant for Image Captioning"
        }
      },
      "id": "7b519ec6-fe9e-4b09-a9bf-57d09c9291b1",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1,
      "position": [
        720,
        -40
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "SHEET_ID",
          "mode": "list",
          "cachedResultName": "Image Captioning"
        },
        "sheetName": {
          "__rl": true,
          "value": "Log",
          "mode": "list",
          "cachedResultName": "Log"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": "Status",
          "schema": []
        }
      },
      "id": "cb192434-f133-499e-a037-bba25d80497b",
      "name": "Append Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [
        930,
        -40
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "channel": "#alerts",
        "text": "Image Captioning error: {$json.error.message}"
      },
      "id": "d5093cf2-db1e-40c7-8d41-819f2b68d2fc",
      "name": "Slack Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 1,
      "position": [
        930,
        120
      ],
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Text Splitter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Window Memory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Splitter": {
      "main": [
        [
          {
            "node": "Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "ai_textSplitter": [
        [
          {
            "node": "Weaviate Insert",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Weaviate Insert",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Weaviate Query",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Weaviate Insert": {
      "ai_document": [
        []
      ]
    },
    "Weaviate Query": {
      "ai_vectorStore": [
        [
          {
            "node": "Vector Tool",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Vector Tool": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Window Memory": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RAG Agent": {
      "main": [
        [
          {
            "node": "Append Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ],
      "onError": [
        [
          {
            "node": "Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "triggerCount": 1
}