LOGOS-SPCW-Matroska / logos_n8n_workflow.json
GitHub Copilot
Protocol 22: Update HF Inference to Router endpoint
edae06c
{
"name": "LOGOS Codebase Analysis (Local Swarm)",
"nodes": [
{
"parameters": {},
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
250,
300
],
"id": "trigger-node"
},
{
"parameters": {
"values": {
"string": [
{
"name": "projectPath",
"value": "C:/Users/Nauti/Desktop/LOGOS CURSOR/"
},
{
"name": "localLLM",
"value": "http://localhost:1234/v1"
}
]
}
},
"name": "Config",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
450,
300
],
"id": "config-node"
},
{
"parameters": {
"command": "dir /s /b *.py",
"cwd": "={{$node[\"Config\"].json[\"projectPath\"]}}"
},
"name": "Find Python Files",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
650,
200
],
"id": "find-files"
},
{
"parameters": {
"functionCode": "const output = [];\nconst files = items[0].json.stdout.split('\\r\\n');\nfor (const file of files) {\n if (file && file.trim() !== '') {\n output.push({json: { filePath: file.trim() }});\n }\n}\nreturn output;"
},
"name": "Split Files",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
850,
200
],
"id": "split-files"
},
{
"parameters": {
"fileSelector": "={{$json[\"filePath\"]}}",
"dataPropertyName": "codeContent"
},
"name": "Read Code",
"type": "n8n-nodes-base.readBinaryFile",
"typeVersion": 1,
"position": [
1050,
200
],
"id": "read-code"
},
{
"parameters": {
"method": "POST",
"url": "={{$node[\"Config\"].json[\"localLLM\"]}}/chat/completions",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "model",
"value": "local-model"
},
{
"name": "messages",
"value": "=[{\"role\": \"system\", \"content\": \"You are a Senior Python Logic Analyzer. Analyze this code for bugs and logic structure.\"}, {\"role\": \"user\", \"content\": \"{{$binary.codeContent.data}}\"}]"
},
{
"name": "stream",
"value": false
}
]
},
"options": {}
},
"name": "Nano Swarm (Code)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1250,
200
],
"id": "local-llm-req"
},
{
"parameters": {
"command": "python hf_space/analyze_uploads.py --recursive",
"cwd": "={{$node[\"Config\"].json[\"projectPath\"]}}"
},
"name": "Analyze Diagrams (Images)",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [
650,
450
],
"id": "analyze-images"
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "Config",
"type": "main",
"index": 0
}
]
]
},
"Config": {
"main": [
[
{
"node": "Find Python Files",
"type": "main",
"index": 0
},
{
"node": "Analyze Diagrams (Images)",
"type": "main",
"index": 0
}
]
]
},
"Find Python Files": {
"main": [
[
{
"node": "Split Files",
"type": "main",
"index": 0
}
]
]
},
"Split Files": {
"main": [
[
{
"node": "Read Code",
"type": "main",
"index": 0
}
]
]
},
"Read Code": {
"main": [
[
{
"node": "Nano Swarm (Code)",
"type": "main",
"index": 0
}
]
]
}
}
}