-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNoteRED.txt
128 lines (128 loc) · 3.87 KB
/
NoteRED.txt
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[
{
"id": "f6f2187d.f17ca8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "3cc11d24.ff01a2",
"type": "comment",
"z": "f6f2187d.f17ca8",
"name": "WARNING: please check you have started this container with a volume that is mounted to /data\\n otherwise any flow changes are lost when you redeploy or upgrade the container\\n (e.g. upgrade to a more recent node-red docker image).\\n If you are using named volumes you can ignore this warning.\\n Double click or see info side panel to learn how to start Node-RED in Docker to save your work",
"info": "\nTo start docker with a bind mount volume (-v option), for example:\n\n```\ndocker run -it -p 1880:1880 -v /home/user/node_red_data:/data --name mynodered nodered/node-red\n```\n\nwhere `/home/user/node_red_data` is a directory on your host machine where you want to store your flows.\n\nIf you do not do this then you can experiment and redploy flows, but if you restart or upgrade the container the flows will be disconnected and lost. \n\nThey will still exist in a hidden data volume, which can be recovered using standard docker techniques, but that is much more complex than just starting with a named volume as described above.",
"x": 350,
"y": 80,
"wires": []
},
{
"id": "203fb853b3a49390",
"type": "inject",
"z": "f6f2187d.f17ca8",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 240,
"wires": [
[
"2a8332fc68232b27"
]
]
},
{
"id": "2a8332fc68232b27",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "send prompt",
"func": "msg.headers = {\n \"Content-Type\": \"application/json\"\n};\nmsg.payload = {\n prompt: \"こんにちは\"\n};\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 240,
"wires": [
[
"7d6defb3d5f48f5d"
]
]
},
{
"id": "114859a0108bed1a",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 340,
"wires": []
},
{
"id": "7d6defb3d5f48f5d",
"type": "http request",
"z": "f6f2187d.f17ca8",
"name": "",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "http://llama_api:8080/ask",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 430,
"y": 240,
"wires": [
[
"0ef7a85aade4c722"
]
]
},
{
"id": "0ef7a85aade4c722",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "convert to japanese",
"func": "msg.payload = JSON.stringify(JSON.parse(msg.payload), null, 2);\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 630,
"y": 240,
"wires": [
[
"114859a0108bed1a"
]
]
}
]