Skip to content

Instantly share code, notes, and snippets.

@drhema
Created April 27, 2024 17:46
Show Gist options
  • Save drhema/48d8c279f292c812c2597297dcaccefa to your computer and use it in GitHub Desktop.
Save drhema/48d8c279f292c812c2597297dcaccefa to your computer and use it in GitHub Desktop.
{
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "88afde21e58448104568b5b2d12a89cf65d9b2abb55492a8c004ceef2395c4dd"
},
"nodes": [
{
"parameters": {
"options": {}
},
"id": "75cd3186-a27b-4225-b7bc-87905c95ca79",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1,
"position": [
1020,
780
],
"credentials": {
"openAiApi": {
"id": "YKkbAovIPIdXxdJn",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"qdrantCollection": {
"__rl": true,
"value": "n8ntest",
"mode": "list",
"cachedResultName": "n8ntest"
}
},
"id": "02fed2fc-8fa9-4cef-8434-c5328c3ed7e3",
"name": "Qdrant Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"typeVersion": 1,
"position": [
1020,
660
],
"credentials": {
"qdrantApi": {
"id": "zde1oMSptoHmoA5Y",
"name": "QdrantApi account"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=Please reply to the following user question about amazon products from the vector database: \nUser question: {{ $json.query }}"
},
"id": "9e73a299-abe9-4416-b328-d247fbb3664d",
"name": "Question and Answer Chain",
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
"typeVersion": 1.3,
"position": [
920,
320
]
},
{
"parameters": {},
"id": "8997ac0d-df64-448b-bfa3-9df7e37ca040",
"name": "Vector Store Retriever",
"type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
"typeVersion": 1,
"position": [
1000,
500
]
},
{
"parameters": {
"model": "gpt-4",
"options": {}
},
"id": "025128e2-5b25-460e-aec5-1425ac0db7cf",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
900,
520
],
"credentials": {
"openAiApi": {
"id": "YKkbAovIPIdXxdJn",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "455ae36e-b7f1-4dbd-8fbb-23e6edbc2106",
"name": "response",
"value": "={{ $json.response.text }}",
"type": "string"
}
]
},
"options": {}
},
"id": "364c8c0a-40b0-4f57-8042-f18bf4ecf61b",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1300,
320
]
},
{
"parameters": {},
"id": "e7fc8102-5fd4-4f90-9c8b-5747c90d6515",
"name": "Chat Trigger",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1,
"position": [
640,
360
],
"webhookId": "50523277-f4d8-468c-9e04-2e82d84ee367"
},
{
"parameters": {},
"id": "96f5cbb4-2d70-4871-ab10-653a4cac62f2",
"name": "Execute Workflow Trigger",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1,
"position": [
640,
540
]
}
],
"connections": {
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Qdrant Vector Store": {
"ai_vectorStore": [
[
{
"node": "Vector Store Retriever",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"Question and Answer Chain": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Vector Store Retriever": {
"ai_retriever": [
[
{
"node": "Question and Answer Chain",
"type": "ai_retriever",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Question and Answer Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Chat Trigger": {
"main": [
[
{
"node": "Question and Answer Chain",
"type": "main",
"index": 0
}
]
]
},
"Execute Workflow Trigger": {
"main": [
[
{
"node": "Question and Answer Chain",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment