- workflow/03_rag/README.md: RAG 워크플로우 인덱스 SSOT - 4개 흐름 문서 추가 (companyx_grounding, rag_search, rag_upload, skill_embedding) - workflow README에 03_rag 인덱스 섹션 연결 - JSON 4개에 settings 필드 추가 Made-with: Cursor
81 lines
2.7 KiB
JSON
81 lines
2.7 KiB
JSON
{
|
|
"name": "robeing-skill-embedding-bridge",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"httpMethod": "POST",
|
|
"path": "v1/multimodal-embed",
|
|
"responseMode": "responseNode",
|
|
"options": {}
|
|
},
|
|
"id": "embed-001",
|
|
"name": "Webhook In",
|
|
"type": "n8n-nodes-base.webhook",
|
|
"typeVersion": 1,
|
|
"position": [200, 240]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"jsCode": "const body = $json.body || {};\nreturn {\n api_key: body.api_key,\n gemini_payload: {\n model: 'models/gemini-embedding-2-preview',\n task_type: body.task_type || 'RETRIEVAL_DOCUMENT',\n content: body.content || { parts: [{ text: body.text || '' }] },\n output_dimensionality: body.dimension || 768\n }\n};"
|
|
},
|
|
"id": "embed-002",
|
|
"name": "Build Gemini Payload",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [450, 240]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "=https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-2-preview:embedContent?key={{$json.api_key}}",
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={{ $json.gemini_payload }}",
|
|
"options": {
|
|
"response": {
|
|
"response": {
|
|
"fullResponse": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"id": "embed-003",
|
|
"name": "Call Gemini Embedding API",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [700, 240]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"jsCode": "const body = $json.body || {};\nreturn {\n success: true,\n embedding: body.embedding?.values || [],\n model: 'gemini-embedding-2-preview'\n};"
|
|
},
|
|
"id": "embed-004",
|
|
"name": "Normalize Response",
|
|
"type": "n8n-nodes-base.code",
|
|
"typeVersion": 2,
|
|
"position": [940, 240]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"respondWith": "json",
|
|
"responseBody": "={{ $json }}",
|
|
"options": {}
|
|
},
|
|
"id": "embed-005",
|
|
"name": "Return Response",
|
|
"type": "n8n-nodes-base.respondToWebhook",
|
|
"typeVersion": 1,
|
|
"position": [1170, 240]
|
|
}
|
|
],
|
|
"connections": {
|
|
"Webhook In": { "main": [[{ "node": "Build Gemini Payload", "type": "main", "index": 0 }]] },
|
|
"Build Gemini Payload": { "main": [[{ "node": "Call Gemini Embedding API", "type": "main", "index": 0 }]] },
|
|
"Call Gemini Embedding API": { "main": [[{ "node": "Normalize Response", "type": "main", "index": 0 }]] },
|
|
"Normalize Response": { "main": [[{ "node": "Return Response", "type": "main", "index": 0 }]] }
|
|
},
|
|
"settings": {},
|
|
"pinData": {},
|
|
"meta": { "templateCredsSetupCompleted": true, "instanceId": "robeing-rag" }
|
|
}
|