OpenAI RAG Chatbot with File Citations

f6334fa4-7752-4caa-829e-ca8571af22bd

Latency
916ms
Cost
$0.0001
Tokens
16
Status
success
gpt-4o-mini

Workflow Graph

Trace

[
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "a61dd9d3-4faa-4878-a6f3-ba8277279002",
    "timestamp": 1782938989825
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1782938989825
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "a61dd9d3-4faa-4878-a6f3-ba8277279002",
    "timestamp": 1782938989825
  },
  {
    "data": {
      "nodeType": "trigger"
    },
    "event": "node_start",
    "nodeId": "539a4e40-9745-4a26-aba8-2cc2b0dd6364",
    "timestamp": 1782938989826
  },
  {
    "data": {
      "kind": "@n8n/n8n-nodes-langchain.chatTrigger"
    },
    "event": "seeded",
    "nodeId": "trigger",
    "timestamp": 1782938989826
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "trigger"
    },
    "event": "node_end",
    "nodeId": "539a4e40-9745-4a26-aba8-2cc2b0dd6364",
    "timestamp": 1782938989826
  },
  {
    "data": {
      "nodeType": "llm"
    },
    "event": "node_start",
    "nodeId": "aa5b2951-df32-43ac-9939-83b02d818e73",
    "timestamp": 1782938989828
  },
  {
    "data": {
      "messages": 1,
      "maxTokens": 1024
    },
    "event": "calling openai/gpt-4o-mini",
    "nodeId": "llm",
    "timestamp": 1782938989828
  },
  {
    "data": {
      "model": "gpt-4o-mini",
      "provider": "openai"
    },
    "event": "llm_call",
    "nodeId": "_context",
    "timestamp": 1782938989828
  },
  {
    "data": {
      "model": "gpt-4o-mini-2024-07-18",
      "costUsd": 0.0001075,
      "provider": "openai",
      "latencyMs": 521,
      "promptTokens": 7,
      "completionTokens": 9
    },
    "event": "llm_result",
    "nodeId": "_context",
    "timestamp": 1782938990352
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "llm"
    },
    "event": "node_end",
    "nodeId": "aa5b2951-df32-43ac-9939-83b02d818e73",
    "timestamp": 1782938990352
  },
  {
    "data": {
      "nodeType": "http"
    },
    "event": "node_start",
    "nodeId": "16429226-e850-4698-b419-fd9805a03fb7",
    "timestamp": 1782938990357
  },
  {
    "event": "fetching GET https://api.openai.com/v1/threads//messages",
    "nodeId": "http",
    "timestamp": 1782938990357
  },
  {
    "data": {
      "url": "https://api.openai.com/v1/threads//messages",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1782938990357
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "http"
    },
    "event": "node_end",
    "nodeId": "16429226-e850-4698-b419-fd9805a03fb7",
    "timestamp": 1782938990499
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "0f51e09f-2782-4e2d-b797-d4d58fcabdaf",
    "timestamp": 1782938990505
  },
  {
    "data": {
      "count": 1
    },
    "event": "splitOut",
    "nodeId": "passthrough",
    "timestamp": 1782938990505
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "0f51e09f-2782-4e2d-b797-d4d58fcabdaf",
    "timestamp": 1782938990505
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "4d569993-1ce3-4b32-beaf-382feac25da9",
    "timestamp": 1782938990507
  },
  {
    "data": {
      "count": 1
    },
    "event": "splitOut",
    "nodeId": "passthrough",
    "timestamp": 1782938990507
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "4d569993-1ce3-4b32-beaf-382feac25da9",
    "timestamp": 1782938990507
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "999e1c2b-1927-4483-aac1-6e8903f7ed25",
    "timestamp": 1782938990510
  },
  {
    "data": {
      "count": 1
    },
    "event": "splitOut",
    "nodeId": "passthrough",
    "timestamp": 1782938990510
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "999e1c2b-1927-4483-aac1-6e8903f7ed25",
    "timestamp": 1782938990510
  },
  {
    "data": {
      "nodeType": "http"
    },
    "event": "node_start",
    "nodeId": "98af62f5-adb0-4e07-a146-fc2f13b851ce",
    "timestamp": 1782938990512
  },
  {
    "event": "fetching GET https://api.openai.com/v1/files/",
    "nodeId": "http",
    "timestamp": 1782938990512
  },
  {
    "data": {
      "url": "https://api.openai.com/v1/files/",
      "method": "GET"
    },
    "event": "http_fetch",
    "nodeId": "_context",
    "timestamp": 1782938990512
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "http"
    },
    "event": "node_end",
    "nodeId": "98af62f5-adb0-4e07-a146-fc2f13b851ce",
    "timestamp": 1782938990731
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "b11f0d3d-bdc4-4845-b14b-d0b0de214f01",
    "timestamp": 1782938990736
  },
  {
    "data": {
      "inputKeys": [
        "statusCode",
        "headers",
        "body"
      ],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1782938990736
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "b11f0d3d-bdc4-4845-b14b-d0b0de214f01",
    "timestamp": 1782938990736
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "b9033511-3421-467a-9bfa-73af01b99c4f",
    "timestamp": 1782938990737
  },
  {
    "data": {
      "count": 1
    },
    "event": "aggregate",
    "nodeId": "passthrough",
    "timestamp": 1782938990737
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "b9033511-3421-467a-9bfa-73af01b99c4f",
    "timestamp": 1782938990737
  },
  {
    "data": {
      "nodeType": "code"
    },
    "event": "node_start",
    "nodeId": "589e2418-5dec-47d0-ba08-420d84f09da7",
    "timestamp": 1782938990738
  },
  {
    "event": "execution error (simulated): $input.item.json.data is not iterable",
    "nodeId": "code",
    "timestamp": 1782938990739
  },
  {
    "data": {
      "mode": "read",
      "status": "ok",
      "service": "code",
      "latencyMs": 0,
      "operation": "exec-failed",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1782938990739
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "code"
    },
    "event": "node_end",
    "nodeId": "589e2418-5dec-47d0-ba08-420d84f09da7",
    "timestamp": 1782938990739
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "d0cbb943-57ab-4850-8370-1625610a852a",
    "timestamp": 1782938990741
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1782938990741
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "d0cbb943-57ab-4850-8370-1625610a852a",
    "timestamp": 1782938990741
  }
]