-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple-ai-workflow.json
More file actions
71 lines (71 loc) · 2.21 KB
/
Copy pathsimple-ai-workflow.json
File metadata and controls
71 lines (71 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"workflow": {
"id": "simple-ai-chat",
"name": "Simple AI Chat with Multiple Providers",
"nodes": [
{
"id": "trigger",
"name": "Input Trigger",
"type": "executor-nodes-base.webhook",
"position": [0, 0],
"parameters": {}
},
{
"id": "openai_chat",
"name": "OpenAI Chat",
"type": "executor-nodes-base.openAI",
"position": [300, 0],
"parameters": {
"model": "gpt-3.5-turbo",
"prompt": "Answer the user's question concisely",
"temperature": 0.7,
"maxTokens": 200,
"apiKey": "YOUR_OPENAI_API_KEY"
}
},
{
"id": "google_chat",
"name": "Google AI Chat",
"type": "executor-nodes-base.googleAI",
"position": [300, 150],
"parameters": {
"model": "gemini-1.5-flash",
"prompt": "Provide a creative response to the user's question",
"temperature": 0.8,
"maxTokens": 200,
"apiKey": "YOUR_GOOGLE_API_KEY"
}
},
{
"id": "comparison",
"name": "Compare Responses",
"type": "executor-nodes-base.code",
"position": [600, 75],
"parameters": {
"code": "const openaiResponse = $items.find(item => item.json.provider === 'openai')?.json.response; const googleResponse = $items.find(item => item.json.provider === 'google')?.json.response; return { comparison: { openai: openaiResponse, google: googleResponse, analysis: 'Both AI models provided responses', timestamp: new Date() } };"
}
}
],
"connections": {
"Input Trigger": {
"main": [
[
{ "node": "OpenAI Chat", "type": "main", "index": 0 },
{ "node": "Google AI Chat", "type": "main", "index": 0 }
]
]
},
"OpenAI Chat": {
"main": [[{ "node": "Compare Responses", "type": "main", "index": 0 }]]
},
"Google AI Chat": {
"main": [[{ "node": "Compare Responses", "type": "main", "index": 0 }]]
}
}
},
"data": {
"prompt": "What are the benefits of automation in business?",
"context": "Business process automation",
"user": "test-user"
}
}