Добавлены все базовые файлы для запуска проекта
This commit is contained in:
@@ -0,0 +1,294 @@
|
||||
{
|
||||
"name": "Загрузка данных в БЗ",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"formTitle": "Загрузка файлов",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "Файлы",
|
||||
"fieldType": "file",
|
||||
"acceptFileTypes": ".md",
|
||||
"requiredField": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"appendAttribution": false,
|
||||
"buttonLabel": "Загрузить"
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"typeVersion": 2.6,
|
||||
"position": [
|
||||
-336,
|
||||
-112
|
||||
],
|
||||
"id": "3bcd7eea-c9ae-4797-b32f-2319eee58f3d",
|
||||
"name": "Форма загрузки",
|
||||
"webhookId": "742bf6de-5158-468c-be36-144af57d69d0"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"typeVersion": 3,
|
||||
"position": [
|
||||
144,
|
||||
-112
|
||||
],
|
||||
"id": "5fd62c9a-aed5-4329-b768-41d2bcfae635",
|
||||
"name": "Loop Over Items"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"fieldToSplitOut": "=$binary",
|
||||
"options": {
|
||||
"includeBinary": true
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-112,
|
||||
-112
|
||||
],
|
||||
"id": "7b54975d-65e6-4126-9b2f-246071e78047",
|
||||
"name": "Список из файлов"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "993d3a50-19a7-4c64-9d36-67c0ced130dd",
|
||||
"responseMode": "lastNode",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
-336,
|
||||
-288
|
||||
],
|
||||
"id": "4c6abbc0-4c23-42a8-bfc4-0db819c357fd",
|
||||
"name": "Webhook загрузка файлов",
|
||||
"webhookId": "993d3a50-19a7-4c64-9d36-67c0ced130dd"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"memoryKey": {
|
||||
"__rl": true,
|
||||
"value": "={{ $('Webhook загрузка файлов').item.json.body.collection_name || \"my-store\" }}",
|
||||
"mode": "id"
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
464,
|
||||
-96
|
||||
],
|
||||
"id": "27d64d0f-f8c1-4d7d-bb08-183fe5d6deda",
|
||||
"name": "Simple Vector Store"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": "qwen/qwen3-embedding-8b",
|
||||
"options": {
|
||||
"stripNewLines": true,
|
||||
"timeout": -1,
|
||||
"encodingFormat": "float"
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
464,
|
||||
592
|
||||
],
|
||||
"id": "bd40cc24-2d40-41b1-afa3-bf9562a62aa7",
|
||||
"name": "Embeddings OpenAI",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "1nJ1BJpmEz5PgE4G",
|
||||
"name": "PolzaAI SchoolHepler"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"dataType": "binary",
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"typeVersion": 1.1,
|
||||
"position": [
|
||||
512,
|
||||
432
|
||||
],
|
||||
"id": "9617644d-af1a-4eb1-a051-598e41c5e032",
|
||||
"name": "Default Data Loader"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"memoryKey": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": ""
|
||||
},
|
||||
"clearStore": true
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
16,
|
||||
256
|
||||
],
|
||||
"id": "ad5f6be6-83e8-4d02-b662-74a405897c3f",
|
||||
"name": "Simple Vector Store1",
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"parameters": {},
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
-224,
|
||||
256
|
||||
],
|
||||
"id": "606b4e74-abdd-4ce2-a2b6-f271d9e82ed6",
|
||||
"name": "Удаление данных"
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Форма загрузки": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Список из файлов",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Simple Vector Store",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Список из файлов": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook загрузка файлов": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Список из файлов",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Simple Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Simple Vector Store1",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Simple Vector Store",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Simple Vector Store1",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simple Vector Store": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Удаление данных": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Simple Vector Store1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": true,
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"binaryMode": "separate"
|
||||
},
|
||||
"versionId": "c8187ef0-3900-41d3-bf53-15a59d2ccf43",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "e2065f384907dad1891d76029e33dd9f27db30e53c43de730e3d4d635e31e1e5"
|
||||
},
|
||||
"nodeGroups": [],
|
||||
"id": "DmUJlHAO6hUXbLlq",
|
||||
"tags": [
|
||||
{
|
||||
"updatedAt": "2026-07-07T06:38:48.585Z",
|
||||
"createdAt": "2026-07-07T06:38:48.585Z",
|
||||
"id": "5vOw2cslMQJWsEiT",
|
||||
"name": "демо"
|
||||
},
|
||||
{
|
||||
"updatedAt": "2026-07-07T06:37:53.737Z",
|
||||
"createdAt": "2026-07-07T06:37:53.737Z",
|
||||
"id": "vhdY444aWHvzAmz8",
|
||||
"name": "нетология"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,425 @@
|
||||
{
|
||||
"name": "Обработка запроса пользователя",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
-272,
|
||||
-16
|
||||
],
|
||||
"id": "061743cb-30cd-4d2d-8b16-113983f3058f",
|
||||
"name": "When chat message received",
|
||||
"webhookId": "9582845f-c8f7-42c5-8010-9f4e274028c1",
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"promptType": "define",
|
||||
"text": "={{ $json.message }}",
|
||||
"hasOutputParser": true,
|
||||
"options": {
|
||||
"systemMessage": "Ты — ассистент, который отвечает на вопросы пользователей.\n\nОБЯЗАТЕЛЬНЫЙ ПОРЯДОК РАБОТЫ:\n1. Сначала ВСЕГДА вызови инструмент поиска по базе знаний.\n2. Проанализируй полученные результаты.\n3. Если в результатах есть ответ на вопрос - используй его.\n4. Если ответа нет в базе знаний - укажи, что заявка передаётся специалисту."
|
||||
}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"typeVersion": 3.1,
|
||||
"position": [
|
||||
16,
|
||||
-224
|
||||
],
|
||||
"id": "4145dbbc-435b-40c6-96d8-763204a2a847",
|
||||
"name": "AI Agent"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "openai/gpt-oss-120b"
|
||||
},
|
||||
"responsesApiEnabled": false,
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
-64,
|
||||
128
|
||||
],
|
||||
"id": "58936870-7416-44a7-b3f3-f9d441b1d790",
|
||||
"name": "OpenAI Chat Model",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "1nJ1BJpmEz5PgE4G",
|
||||
"name": "PolzaAI SchoolHepler"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"sessionIdType": "customKey",
|
||||
"sessionKey": "={{ $json.session_id }}"
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"typeVersion": 1.4,
|
||||
"position": [
|
||||
-64,
|
||||
336
|
||||
],
|
||||
"id": "f28acb38-e8ed-4d18-88a0-5ba8170bbf8e",
|
||||
"name": "Simple Memory"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "retrieve-as-tool",
|
||||
"toolDescription": "Поиск по базе знаний. Возвращает релевантные документы и фрагменты текста по запросу пользователя. Используй этот инструмент для получения фактических данных перед ответом.",
|
||||
"memoryKey": {
|
||||
"__rl": true,
|
||||
"value": "={{ $json.collection_name }}",
|
||||
"mode": "id"
|
||||
},
|
||||
"topK": 10,
|
||||
"includeDocumentMetadata": false
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
64,
|
||||
160
|
||||
],
|
||||
"id": "d2972aa7-2cbe-4eaa-8b26-d50742f56379",
|
||||
"name": "Simple Vector Store"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"model": "qwen/qwen3-embedding-8b",
|
||||
"options": {}
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
64,
|
||||
384
|
||||
],
|
||||
"id": "351b9336-788a-4a58-9b17-16a03570e5a7",
|
||||
"name": "Embeddings OpenAI",
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "1nJ1BJpmEz5PgE4G",
|
||||
"name": "PolzaAI SchoolHepler"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "126bdb74-0630-415d-a8f7-6f699eac1a2c",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
-480,
|
||||
-224
|
||||
],
|
||||
"id": "bb7780bd-8dad-48f5-8a1d-4f29a5b981c9",
|
||||
"name": "Webhook запрос от пользователя",
|
||||
"webhookId": "126bdb74-0630-415d-a8f7-6f699eac1a2c"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "0823a8e5-4e4c-4308-9d13-873718f4eaff",
|
||||
"name": "message",
|
||||
"value": "={{ $json.body.message }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "c9e5c033-1afc-4241-b751-dec53f4bae73",
|
||||
"name": "collection_name",
|
||||
"value": "={{ $json.body.collection_name }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "dd16d556-1d31-4458-b817-ff41325cf4dc",
|
||||
"name": "session_id",
|
||||
"value": "={{ $json.body.session_id }}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.5,
|
||||
"position": [
|
||||
-256,
|
||||
-224
|
||||
],
|
||||
"id": "9961d520-7f99-417e-b490-398af83c026e",
|
||||
"name": "Набор данных"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "text",
|
||||
"responseBody": "={{ $('AI Agent').item.json.output.output }}",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.5,
|
||||
"position": [
|
||||
768,
|
||||
-208
|
||||
],
|
||||
"id": "4185c82c-d175-4dcf-8322-e0a4343a458f",
|
||||
"name": "Respond to Webhook"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsonSchemaExample": "{\n\t\"respond_specialist\": true,\n\t\"output\": \"AI-agent message\"\n}",
|
||||
"autoFix": true
|
||||
},
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"typeVersion": 1.3,
|
||||
"position": [
|
||||
224,
|
||||
-16
|
||||
],
|
||||
"id": "6d7b0681-0b9a-4986-a5fb-b304966a9df1",
|
||||
"name": "Structured Output Parser"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict",
|
||||
"version": 3
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7720521f-fc12-4951-9139-4a2bd7e1d75d",
|
||||
"leftValue": "={{ $json.output.respond_specialist }}",
|
||||
"rightValue": true,
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.3,
|
||||
"position": [
|
||||
352,
|
||||
-224
|
||||
],
|
||||
"id": "50a346b0-ed53-431d-9b6b-182f9440e694",
|
||||
"name": "If"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"chatId": "924632699",
|
||||
"text": "=Пользователь с ID сессии {{ $('Набор данных').item.json.session_id }} спрашивает:\n\n> {{ $('Набор данных').item.json.message }}",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false,
|
||||
"parse_mode": "MarkdownV2"
|
||||
}
|
||||
},
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.2,
|
||||
"position": [
|
||||
560,
|
||||
-416
|
||||
],
|
||||
"id": "a754cd7f-116b-46c4-801f-9a7c28f4fbdb",
|
||||
"name": "Send a text message",
|
||||
"webhookId": "f070ee47-10e5-4b99-acda-80ed4d4b0551",
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "TMf5pmo2QkGa0FLR",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Structured Output Parser",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simple Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simple Vector Store": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Simple Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook запрос от пользователя": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Набор данных",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Набор данных": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send a text message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send a text message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": true,
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"binaryMode": "separate"
|
||||
},
|
||||
"versionId": "a67627cb-e138-410f-99a3-7303ce35ed3c",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "e2065f384907dad1891d76029e33dd9f27db30e53c43de730e3d4d635e31e1e5"
|
||||
},
|
||||
"nodeGroups": [],
|
||||
"id": "GhysEdTOeQjkVtzj",
|
||||
"tags": [
|
||||
{
|
||||
"updatedAt": "2026-07-07T06:38:48.585Z",
|
||||
"createdAt": "2026-07-07T06:38:48.585Z",
|
||||
"id": "5vOw2cslMQJWsEiT",
|
||||
"name": "демо"
|
||||
},
|
||||
{
|
||||
"updatedAt": "2026-07-09T10:39:58.552Z",
|
||||
"createdAt": "2026-07-09T10:39:58.552Z",
|
||||
"id": "Svg7ELOEItGRgTWW",
|
||||
"name": "агент"
|
||||
},
|
||||
{
|
||||
"updatedAt": "2026-07-07T06:37:53.737Z",
|
||||
"createdAt": "2026-07-07T06:37:53.737Z",
|
||||
"id": "vhdY444aWHvzAmz8",
|
||||
"name": "нетология"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user