{
  "name": "Chat assistant (OpenAI assistant) with Postgres memory and API calling capabalities",
  "nodes": [
    {
      "id": "c6e454af-70a1-4c65-8450-8159f7fc738b",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        160,
        560
      ]
    },
    {
      "id": "2221736f-ef99-4ac8-8a81-51af6d4e7dcd",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        960
      ]
    },
    {
      "id": "6aa1b3a4-0e6a-4312-9d9f-f67c4bf8f443",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        920,
        960
      ]
    },
    {
      "id": "6afe6158-7a8b-4a83-a778-6fd28e2a11af",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        600,
        960
      ]
    },
    {
      "id": "4b961f1d-7da2-4a0b-98e3-7ec35ee14335",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -20,
        560
      ]
    },
    {
      "id": "dccdb07f-97db-4a5a-9b09-02a5de65246e",
      "name": "Postgres Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        640,
        720
      ]
    },
    {
      "id": "553dd27b-ab06-4605-99e0-8f15735cfff3",
      "name": "Postgres Chat Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        760,
        1160
      ]
    },
    {
      "id": "0103fb97-c691-4bd3-b26d-85aaa9774594",
      "name": "Products in Daatabase",
      "type": "n8n-nodes-base.mySqlTool",
      "position": [
        1460,
        600
      ]
    },
    {
      "id": "0cdfd89f-eb9e-4b6c-90d1-1cf8d6ed96bb",
      "name": "Knowledge Base",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1340,
        600
      ]
    },
    {
      "id": "393f792a-4eff-4b33-aac0-025fc622a4b3",
      "name": "External API",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        1200,
        600
      ]
    },
    {
      "id": "7ce7a5e7-6238-4479-a26f-bdcde1784188",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        414
      ],
      "parameters": {
        "width": 436.73182569600795,
        "height": 367.7413881276459,
        "content": "TOOLS"
      }
    },
    {
      "id": "df6737ca-c588-48fc-9761-2a5307841298",
      "name": "OpenAI2",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        460,
        460
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "OpenAI2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "OpenAI2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "External API": {
      "ai_tool": [
        [
          {
            "node": "OpenAI2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Knowledge Base": {
      "ai_tool": [
        [
          {
            "node": "OpenAI2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "OpenAI2",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory1": {
      "ai_memory": [
        [
          {
            "node": "OpenAI",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Products in Daatabase": {
      "ai_tool": [
        [
          {
            "node": "OpenAI2",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}