Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "nodes": [
- {
- "parameters": {
- "public": true,
- "initialMessages": "upload file",
- "options": {
- "allowFileUploads": true,
- "responseMode": "lastNode",
- "showWelcomeScreen": false
- }
- },
- "id": "36f1f675-82f2-443f-8124-7bcbc0167397",
- "name": "When chat message received",
- "type": "@n8n/n8n-nodes-langchain.chatTrigger",
- "typeVersion": 1.1,
- "position": [
- -240,
- 60
- ],
- "webhookId": "1c1f408c-25b5-4776-a3cf-da267611b299"
- },
- {
- "parameters": {
- "jsCode": "let results = [];\n\nfor (item of items) {\n for (key of Object.keys(item.binary)) {\n results.push({\n json: item.json.files.find(file => file.fileName === item.binary[key].fileName),\n binary: {\n data: item.binary[key],\n }\n });\n }\n}\n\nreturn results;"
- },
- "id": "8a4c896e-ced2-4794-8678-0b856467f29a",
- "name": "Files To List",
- "type": "n8n-nodes-base.code",
- "typeVersion": 2,
- "position": [
- 100,
- 260
- ]
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "11a4b1e5-2065-4bfd-ba7c-12def5c65116",
- "name": "sessionId",
- "value": "={{ $('When chat message received').first().json.sessionId }}",
- "type": "string"
- },
- {
- "id": "43953933-fc55-46c0-8376-cfc357789dbb",
- "name": "action",
- "value": "={{ $('When chat message received').first().json.action }}",
- "type": "string"
- },
- {
- "id": "9869788e-1743-41dc-ad6d-b48a80fa86af",
- "name": "chatInput",
- "value": "={{ $('When chat message received').first().json.chatInput }}",
- "type": "string"
- },
- {
- "id": "d2834c08-396e-4735-a919-05a46109c311",
- "name": "files",
- "value": "={{ $json.files }}",
- "type": "array"
- }
- ]
- },
- "options": {}
- },
- "id": "0b045f22-504d-4fc5-81ca-52a12693bc39",
- "name": "Set Fields",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 600,
- 80
- ]
- },
- {
- "parameters": {
- "options": {}
- },
- "id": "70ca844a-641b-4791-801e-96909e9abe8d",
- "name": "OpenAI Chat Model",
- "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
- "typeVersion": 1,
- "position": [
- 840,
- 260
- ],
- "credentials": {
- "openAiApi": {
- "id": "iuBjR0mRLNV8iloe",
- "name": "OpenAi account"
- }
- }
- },
- {
- "parameters": {},
- "id": "45e8a59b-a5c4-40dd-92a2-cb0c80e74548",
- "name": "Execute Workflow Trigger",
- "type": "n8n-nodes-base.executeWorkflowTrigger",
- "typeVersion": 1,
- "position": [
- 520,
- 820
- ]
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "5771fb42-e4a9-44d7-8946-6bca673480c3",
- "name": "response",
- "value": "Unknown command. Try a different route.",
- "type": "string"
- }
- ]
- },
- "options": {}
- },
- "id": "e399a472-632e-47e4-8f8b-d9456d59e9ad",
- "name": "Unknown Route",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 1080,
- 1320
- ]
- },
- {
- "parameters": {
- "options": {}
- },
- "id": "e0399fb2-1412-4cad-9ea1-e1101548ef25",
- "name": "OpenAI Chat Model1",
- "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
- "typeVersion": 1,
- "position": [
- 1620,
- 480
- ],
- "credentials": {
- "openAiApi": {
- "id": "iuBjR0mRLNV8iloe",
- "name": "OpenAi account"
- }
- }
- },
- {
- "parameters": {
- "operation": "pdf",
- "options": {}
- },
- "id": "03d2c8fe-e24a-418e-95b7-babee8b5cb28",
- "name": "Extract from File",
- "type": "n8n-nodes-base.extractFromFile",
- "typeVersion": 1,
- "position": [
- 1460,
- 360
- ]
- },
- {
- "parameters": {
- "rules": {
- "values": [
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "leftValue": "={{ $json.fileType }}",
- "rightValue": "pdf",
- "operator": {
- "type": "string",
- "operation": "equals"
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "pdf"
- },
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "id": "c0432ab1-1b11-4b47-a135-099be7fde656",
- "leftValue": "={{ [\"jpg\",\"jpeg\",\"png\",\"gif\"] }}",
- "rightValue": "={{ $json.fileType.toLowerCase() }}",
- "operator": {
- "type": "array",
- "operation": "contains",
- "rightType": "any"
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "image"
- }
- ]
- },
- "options": {}
- },
- "id": "6d6f3374-0b08-4de1-b2b5-8dc876e01b98",
- "name": "Handle FileType",
- "type": "n8n-nodes-base.switch",
- "typeVersion": 3.2,
- "position": [
- 1240,
- 500
- ]
- },
- {
- "parameters": {
- "options": {}
- },
- "id": "38c3fe12-eba2-4f08-bc52-d512ff5aea22",
- "name": "OpenAI Chat Model2",
- "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
- "typeVersion": 1,
- "position": [
- 1480,
- 780
- ],
- "credentials": {
- "openAiApi": {
- "id": "iuBjR0mRLNV8iloe",
- "name": "OpenAi account"
- }
- }
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "f1f677cd-31be-4383-adcf-f01eb83899d7",
- "name": "response",
- "value": "={{ $json.text }}",
- "type": "string"
- }
- ]
- },
- "options": {}
- },
- "id": "a4ed6434-9a79-4de9-a894-acfb7c494d4d",
- "name": "Send Response",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 1780,
- 640
- ]
- },
- {
- "parameters": {
- "promptType": "define",
- "text": "={{ $('Execute Workflow Trigger').first().json.query.question }}",
- "messages": {
- "messageValues": [
- {
- "message": "Answer the user's question using the contents of the pdf provided."
- },
- {
- "type": "HumanMessagePromptTemplate",
- "message": "=This is the content of the pdf:\n{{ $json.text }}"
- }
- ]
- }
- },
- "id": "655d3dfa-d2b4-4bf5-bedb-be3a03f3ac75",
- "name": "Answer from PDF Contents",
- "type": "@n8n/n8n-nodes-langchain.chainLlm",
- "typeVersion": 1.5,
- "position": [
- 1620,
- 360
- ]
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "f1f677cd-31be-4383-adcf-f01eb83899d7",
- "name": "response",
- "value": "={{ $json.text }}",
- "type": "string"
- }
- ]
- },
- "options": {}
- },
- "id": "1e93c421-9206-4079-90ea-92e6a2812198",
- "name": "Send Response1",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 1940,
- 360
- ]
- },
- {
- "parameters": {
- "promptType": "define",
- "text": "={{ $json.chatInput }}\n{{\n$json.files\n ? `Here are the file locations:\n ${$json.files.map(file => file.fileName).join('\\n')}\n `\n : ''\n}}",
- "options": {
- "systemMessage": "Answer the user's question.\n\nAll files given by the user are stored in a directory. Use the tool to query the files where relevant."
- }
- },
- "id": "e946d19c-b3fe-4f4b-8f9d-bbee9cb7a15c",
- "name": "AI Agent",
- "type": "@n8n/n8n-nodes-langchain.agent",
- "typeVersion": 1.7,
- "position": [
- 840,
- 80
- ]
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "f1f677cd-31be-4383-adcf-f01eb83899d7",
- "name": "response",
- "value": "={{ $json.stdout }}",
- "type": "string"
- }
- ]
- },
- "options": {}
- },
- "id": "9465f0e6-f2c5-468b-aa9a-946fc03f77f9",
- "name": "Send Response2",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 1240,
- 920
- ]
- },
- {
- "parameters": {
- "name": "read_file_from_directory",
- "description": "Call this tool to query the contents of a file saved in the directory. Please note that only the answer will be returned and not the file.",
- "workflowId": {
- "__rl": true,
- "value": "={{ $workflow.id }}",
- "mode": "id"
- },
- "fields": {
- "values": [
- {
- "name": "route",
- "stringValue": "read_file"
- }
- ]
- },
- "specifyInputSchema": true,
- "schemaType": "manual",
- "inputSchema": "{\n\"type\": \"object\",\n\"properties\": {\n \"question\": {\n \"type\": \"string\",\n \"description\": \"ensure this is a fully formed question\"\n },\n\t\"filepath\": { \"type\": \"string\" }\n }\n}"
- },
- "id": "b38901b9-97d2-4070-b28c-2f39b7af4639",
- "name": "Read File Tool",
- "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
- "typeVersion": 1.2,
- "position": [
- 1080,
- 260
- ]
- },
- {
- "parameters": {
- "name": "search_directory",
- "description": "Call this tool to search over the directory listing.",
- "workflowId": {
- "__rl": true,
- "value": "={{ $workflow.id }}",
- "mode": "id"
- },
- "fields": {
- "values": [
- {
- "name": "route",
- "stringValue": "search_file"
- }
- ]
- },
- "specifyInputSchema": true,
- "jsonSchemaExample": "{\n\t\"search_terms\": \"some_value\"\n}"
- },
- "id": "3c5a2c48-62ce-4b31-b7ee-4f32cd1add22",
- "name": "Search File Tool",
- "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
- "typeVersion": 1.2,
- "position": [
- 1200,
- 260
- ]
- },
- {
- "parameters": {
- "rules": {
- "values": [
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "leftValue": "={{ $json.files }}",
- "rightValue": "",
- "operator": {
- "type": "array",
- "operation": "notExists",
- "singleValue": true
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "without files"
- },
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "id": "0d67ec0a-1d61-4f6a-97e5-965b0d340ae4",
- "leftValue": "={{ $json.files }}",
- "rightValue": "",
- "operator": {
- "type": "array",
- "operation": "exists",
- "singleValue": true
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "with files"
- }
- ]
- },
- "options": {}
- },
- "id": "ae3aea1e-f5a8-4365-b1ac-56496404d071",
- "name": "Has Files?",
- "type": "n8n-nodes-base.switch",
- "typeVersion": 3.2,
- "position": [
- -80,
- 60
- ]
- },
- {
- "parameters": {
- "rules": {
- "values": [
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "leftValue": "={{ $json.route }}",
- "rightValue": "read_file",
- "operator": {
- "type": "string",
- "operation": "equals"
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "Read File from Directory"
- },
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "id": "2d2b7d5d-ac9b-492c-b85f-db423dce1545",
- "leftValue": "={{ $json.route }}",
- "rightValue": "search_file",
- "operator": {
- "type": "string",
- "operation": "equals",
- "name": "filter.operator.equals"
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "search_file"
- },
- {
- "conditions": {
- "options": {
- "caseSensitive": true,
- "leftValue": "",
- "typeValidation": "strict",
- "version": 2
- },
- "conditions": [
- {
- "id": "804cb293-28f0-4525-9c68-2de5b279b7d3",
- "leftValue": "={{ $json.route }}",
- "rightValue": "print_file",
- "operator": {
- "type": "string",
- "operation": "equals",
- "name": "filter.operator.equals"
- }
- }
- ],
- "combinator": "and"
- },
- "renameOutput": true,
- "outputKey": "print_file"
- }
- ]
- },
- "options": {
- "fallbackOutput": "extra"
- }
- },
- "id": "21a9081c-d56a-44dc-a924-ac83c4ef2e9e",
- "name": "Handle Route",
- "type": "n8n-nodes-base.switch",
- "typeVersion": 3.2,
- "position": [
- 700,
- 820
- ]
- },
- {
- "parameters": {
- "content": "### 2. Split Files Array into Separate Items\nOnly way to split is to use the code node. This allows us to action each file separately.",
- "height": 97.49999999999994,
- "width": 333.74999999999994,
- "color": 7
- },
- "id": "5570607b-12b9-4802-9097-ab120a166649",
- "name": "Sticky Note",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- -140,
- 420
- ]
- },
- {
- "parameters": {
- "aggregate": "aggregateAllItemData",
- "destinationFieldName": "files",
- "options": {}
- },
- "id": "e6d6dbbc-ab04-4c87-bec1-eff8eea01f80",
- "name": "Combine",
- "type": "n8n-nodes-base.aggregate",
- "typeVersion": 1,
- "position": [
- 420,
- 260
- ]
- },
- {
- "parameters": {
- "content": "### 3. Combine file paths using Aggregate node\nWhen returning the filepaths to the agent, we don't want them as separate items but rather just a single list to inject into the prompt.",
- "height": 106.24999999999991,
- "width": 363.74999999999994,
- "color": 7
- },
- "id": "bfda9dc8-39fd-4627-b8a1-d75713dede9a",
- "name": "Sticky Note1",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- 420,
- 420
- ]
- },
- {
- "parameters": {
- "content": "### 1. Detect if files are included\nJust check the message before it hits the agent. You can put any number of other nodes in-between the chat trigger and AI agent.",
- "height": 113.74999999999994,
- "width": 333.74999999999994,
- "color": 7
- },
- "id": "75e5f1a5-85cb-4b36-b22d-b5a0d2d698d9",
- "name": "Sticky Note2",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- -160,
- -100
- ]
- },
- {
- "parameters": {
- "content": "### 4. Use tools to interact with the files saved to disk\nCustom workflow tools are preferred method here.",
- "height": 107.99999999999997,
- "width": 234.00000000000006,
- "color": 7
- },
- "id": "6fb1ca32-3403-43df-8f99-0c70d94aa9af",
- "name": "Sticky Note3",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- 900,
- -80
- ]
- },
- {
- "parameters": {
- "content": "### 5. This is an example of the subworkflow router pattern\nIt lets you have multiple subworkflow tools in one template.",
- "height": 115,
- "width": 277.00000000000006,
- "color": 7
- },
- "id": "13e5d922-b699-4698-aaa5-712c1de67699",
- "name": "Sticky Note4",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- 520,
- 660
- ]
- },
- {
- "parameters": {
- "content": "### 6. Extract contents from PDF\nTo read PDFs, you'll need to use the \"Extract from File\" node to get the text. Once extracted, provide it to the prompt as context.",
- "height": 115,
- "width": 338.00000000000006,
- "color": 7
- },
- "id": "4061eae9-743e-4aa7-8226-72aed67f3f4d",
- "name": "Sticky Note5",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- 1460,
- 220
- ]
- },
- {
- "parameters": {
- "fileSelector": "={{ $json.query.filepath }}",
- "options": {}
- },
- "id": "2094caf7-39aa-42c3-9c73-f768682592c9",
- "name": "Read File",
- "type": "n8n-nodes-base.readWriteFile",
- "typeVersion": 1,
- "position": [
- 1080,
- 640
- ],
- "onError": "continueErrorOutput"
- },
- {
- "parameters": {
- "content": "### 7. Extract contents from Images\nTo read images, typically the AI can read this for you without prior conversion steps. Use the binary message type for user to achieve this with n8n.",
- "height": 112,
- "width": 356.0000000000001,
- "color": 7
- },
- "id": "0e531344-0474-4a7a-a745-6e80c8c49ba2",
- "name": "Sticky Note6",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- 1600,
- 820
- ]
- },
- {
- "parameters": {
- "content": "### A note on Tool Design\nIdeally, you want the tool to return only the data you're looking for. Here the read file tool passes in a question alongside the filepath - this avoids the need to return the full file contents.",
- "height": 134,
- "width": 349
- },
- "id": "082a4383-7442-4806-b450-6e9768870e80",
- "name": "Sticky Note7",
- "type": "n8n-nodes-base.stickyNote",
- "typeVersion": 1,
- "position": [
- 1140,
- -80
- ]
- },
- {
- "parameters": {},
- "id": "f56cc014-d950-412f-9f0e-758b2cc1f896",
- "name": "Window Buffer Memory",
- "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
- "typeVersion": 1.3,
- "position": [
- 960,
- 260
- ]
- },
- {
- "parameters": {
- "promptType": "define",
- "text": "={{ $('Execute Workflow Trigger').first().json.query.question }}",
- "messages": {
- "messageValues": [
- {
- "message": "Answer the user's question using the contents of the image provided."
- },
- {
- "type": "HumanMessagePromptTemplate",
- "messageType": "imageBinary"
- }
- ]
- }
- },
- "id": "64ea6945-f986-4589-b68d-e1a05fc1a038",
- "name": "Answer from Image Contents",
- "type": "@n8n/n8n-nodes-langchain.chainLlm",
- "typeVersion": 1.5,
- "position": [
- 1460,
- 640
- ]
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "5f95ad92-2eab-44ec-9bd9-d5170e6607bc",
- "name": "response",
- "value": "File not found. Be sure to prepend the full path `/home/node/temp/...`",
- "type": "string"
- }
- ]
- },
- "options": {}
- },
- "id": "0be6b373-13e2-4de8-913d-efc7f1a6af22",
- "name": "Not Found Response",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 1240,
- 740
- ]
- },
- {
- "parameters": {
- "command": "=ls /home/node/temp | grep '{{ $json.query.search_terms.split(' ').join('\\\\|') }}'"
- },
- "id": "6577da76-bf5b-45e1-afe1-0d9d2d84f8ff",
- "name": "Search Directory",
- "type": "n8n-nodes-base.executeCommand",
- "typeVersion": 1,
- "position": [
- 1080,
- 920
- ]
- },
- {
- "parameters": {
- "operation": "write",
- "fileName": "={{ `/home/node/temp/${$json.fileName}` }}",
- "options": {}
- },
- "id": "f631b21f-007f-4de5-a863-f380df3fa834",
- "name": "Read/Write Files from Disk",
- "type": "n8n-nodes-base.readWriteFile",
- "typeVersion": 1,
- "position": [
- 260,
- 260
- ]
- },
- {
- "parameters": {
- "name": "print_File",
- "description": "Call this tool to print the file at the full path saved in the directory. Please note that if no error is returned, it indicates that the printing was successful.",
- "workflowId": {
- "__rl": true,
- "value": "={{ $workflow.id }}",
- "mode": "id"
- },
- "fields": {
- "values": [
- {
- "name": "route",
- "stringValue": "print_file"
- }
- ]
- },
- "specifyInputSchema": true,
- "schemaType": "manual",
- "inputSchema": "{\n\"type\": \"object\",\n\"properties\": {\n \"question\": {\n \"type\": \"string\",\n \"description\": \"ensure this is a fully formed question\"\n },\n\t\"filepath\": { \"type\": \"string\" }\n }\n}"
- },
- "id": "5dc00612-7855-42f7-9c6d-7ab396753187",
- "name": "Print File",
- "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
- "typeVersion": 1.2,
- "position": [
- 1340,
- 260
- ]
- },
- {
- "parameters": {
- "command": "start winword.exe /p \"C:\\Users\\Administrator\\Desktop\\aaa.pdf\""
- },
- "type": "n8n-nodes-base.executeCommand",
- "typeVersion": 1,
- "position": [
- 1080,
- 1120
- ],
- "id": "3a8bbd05-44f8-422b-8cb4-61e05161fd1b",
- "name": "Execute Command"
- },
- {
- "parameters": {
- "assignments": {
- "assignments": [
- {
- "id": "f1f677cd-31be-4383-adcf-f01eb83899d7",
- "name": "response",
- "value": "={{ $json.stdout }}",
- "type": "string"
- }
- ]
- },
- "options": {}
- },
- "id": "f1e7a702-042f-4b23-a6a4-041183328ccb",
- "name": "Send Response3",
- "type": "n8n-nodes-base.set",
- "typeVersion": 3.4,
- "position": [
- 1420,
- 1120
- ]
- },
- {
- "parameters": {},
- "type": "n8n-nodes-base.wait",
- "typeVersion": 1.1,
- "position": [
- 1240,
- 1120
- ],
- "id": "2a11a875-e933-4ad8-95b6-d87649180dc4",
- "name": "Wait",
- "webhookId": "165734d4-0433-48c0-b9ce-50c5bfd3004a"
- },
- {
- "parameters": {
- "operation": "write",
- "fileName": "={{ `C:\\\\home\\\\node\\\\temp\\\\${$json.fileName}` }}",
- "options": {}
- },
- "id": "33fbcf3d-5868-4f39-a96d-5403fef1b819",
- "name": "Read/Write Files from Disk1",
- "type": "n8n-nodes-base.readWriteFile",
- "typeVersion": 1,
- "position": [
- 260,
- 500
- ]
- }
- ],
- "connections": {
- "When chat message received": {
- "main": [
- [
- {
- "node": "Has Files?",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Files To List": {
- "main": [
- [
- {
- "node": "Read/Write Files from Disk",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Set Fields": {
- "main": [
- [
- {
- "node": "AI Agent",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "OpenAI Chat Model": {
- "ai_languageModel": [
- [
- {
- "node": "AI Agent",
- "type": "ai_languageModel",
- "index": 0
- }
- ]
- ]
- },
- "Execute Workflow Trigger": {
- "main": [
- [
- {
- "node": "Handle Route",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "OpenAI Chat Model1": {
- "ai_languageModel": [
- [
- {
- "node": "Answer from PDF Contents",
- "type": "ai_languageModel",
- "index": 0
- }
- ]
- ]
- },
- "Extract from File": {
- "main": [
- [
- {
- "node": "Answer from PDF Contents",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Handle FileType": {
- "main": [
- [
- {
- "node": "Extract from File",
- "type": "main",
- "index": 0
- }
- ],
- [
- {
- "node": "Answer from Image Contents",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "OpenAI Chat Model2": {
- "ai_languageModel": [
- [
- {
- "node": "Answer from Image Contents",
- "type": "ai_languageModel",
- "index": 0
- }
- ]
- ]
- },
- "Answer from PDF Contents": {
- "main": [
- [
- {
- "node": "Send Response1",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Read File Tool": {
- "ai_tool": [
- [
- {
- "node": "AI Agent",
- "type": "ai_tool",
- "index": 0
- }
- ]
- ]
- },
- "Search File Tool": {
- "ai_tool": [
- [
- {
- "node": "AI Agent",
- "type": "ai_tool",
- "index": 0
- }
- ]
- ]
- },
- "Has Files?": {
- "main": [
- [
- {
- "node": "Set Fields",
- "type": "main",
- "index": 0
- }
- ],
- [
- {
- "node": "Files To List",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Handle Route": {
- "main": [
- [
- {
- "node": "Read File",
- "type": "main",
- "index": 0
- }
- ],
- [
- {
- "node": "Search Directory",
- "type": "main",
- "index": 0
- }
- ],
- [
- {
- "node": "Execute Command",
- "type": "main",
- "index": 0
- }
- ],
- [
- {
- "node": "Unknown Route",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Combine": {
- "main": [
- [
- {
- "node": "Set Fields",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Read File": {
- "main": [
- [
- {
- "node": "Handle FileType",
- "type": "main",
- "index": 0
- }
- ],
- [
- {
- "node": "Not Found Response",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Window Buffer Memory": {
- "ai_memory": [
- [
- {
- "node": "AI Agent",
- "type": "ai_memory",
- "index": 0
- }
- ]
- ]
- },
- "Answer from Image Contents": {
- "main": [
- [
- {
- "node": "Send Response",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Search Directory": {
- "main": [
- [
- {
- "node": "Send Response2",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Read/Write Files from Disk": {
- "main": [
- [
- {
- "node": "Combine",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Print File": {
- "ai_tool": [
- [
- {
- "node": "AI Agent",
- "type": "ai_tool",
- "index": 0
- }
- ]
- ]
- },
- "Execute Command": {
- "main": [
- [
- {
- "node": "Wait",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Wait": {
- "main": [
- [
- {
- "node": "Send Response3",
- "type": "main",
- "index": 0
- }
- ]
- ]
- }
- },
- "pinData": {}
- }
Advertisement
Add Comment
Please, Sign In to add comment