sozsoft-platform/configs/ai/Chat.json

194 lines
4.6 KiB
JSON
Raw Permalink Normal View History

2026-03-21 16:59:22 +00:00
{
"name": "Chat",
"nodes": [
{
"parameters": {
"multipleMethods": true,
"httpMethod": [
"POST"
],
"path": "chat",
"responseMode": "lastNode",
"responseData": "allEntries",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-704,
224
],
"id": "5624c28a-5e8f-4fd9-88ac-bc9a630a9cc0",
"name": "Webhook",
"webhookId": "562dfd4f-4e0b-4292-9986-2fbd3b8ecdc9",
"alwaysOutputData": true,
"executeOnce": false,
"retryOnFail": false
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.question }}",
"options": {
"systemMessage": "Kullanıcı: {{ $json.body.question }}\n\nDoğrudan yanıt ver. Açıklayıcı, öğretici ve samimi ol."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-48,
224
],
"id": "f5a4eb80-6e3f-47a3-9e42-069fb6992a8b",
"name": "AI Chat",
"alwaysOutputData": false,
"onError": "continueErrorOutput"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.memoryManager",
"typeVersion": 1.1,
"position": [
-448,
224
],
"id": "f008f540-216b-42f3-815c-b17658b4c7ad",
"name": "Chat Memory Manager",
"alwaysOutputData": false,
"disabled": true
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Webhook').item.json.body.sessionId }}",
"contextWindowLength": 100
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
-304,
480
],
"id": "80c637b6-06e1-41b1-a946-84065a9e327a",
"name": "Simple Memory"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
-48,
480
],
"id": "08879cec-78df-4bd7-a8aa-f0ec6fc5e0ae",
"name": "Google Gemini Chat Model",
"credentials": {
"googlePalmApi": {
"id": "2y8O0r5mQKG5cdcc",
"name": "Google Gemini(PaLM) Api account"
}
}
},
{
"parameters": {
"jsCode": "const cleanText = (text) =>\n text\n .replace(/\\\\/g, \"\\\\\\\\\") // ters slash\n .replace(/\"/g, '\\\\\"'); // çift tırnak\n\nreturn [\n {\n json: {\n type: \"chat\",\n question: $('Webhook').first().json.body.question,\n sql: null,\n answer: cleanText($input.first().json.output),\n chart: null,\n error: $input.first().json.error || null\n }\n }\n];\n\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
560,
224
],
"id": "7f66cfbf-d19e-421b-92c3-d9a1909c1434",
"name": "Chat Code",
"alwaysOutputData": true
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Chat Memory Manager",
"type": "main",
"index": 0
}
],
[]
]
},
"AI Chat": {
"main": [
[
{
"node": "Chat Code",
"type": "main",
"index": 0
}
],
[
{
"node": "Chat Code",
"type": "main",
"index": 0
}
]
]
},
"Chat Memory Manager": {
"main": [
[
{
"node": "AI Chat",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Chat",
"type": "ai_memory",
"index": 0
},
{
"node": "Chat Memory Manager",
"type": "ai_memory",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Chat",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"availableInMCP": false
},
"versionId": "84010ee3-81a9-48c8-9b48-a0661355d85c",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1d288821beaaeeada5e8dce6f282c802098a0c83ef6ddb35a174b09a9d43850e"
},
"id": "R1V2XtEQCknLJvSkwUW6s",
"tags": []
}