Skip to content

Commit 59884f3

Browse files
committed
Add Google Gemini flow example for image generation
1 parent dfd6180 commit 59884f3

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"schemaType": "flow",
3+
"schemaVersion": "0.0.1",
4+
"id": "1234",
5+
"flows": {
6+
"flow": {
7+
"flowType": "flow",
8+
"nodes": [
9+
{
10+
"id": "1bc4104f-6c09-4bd2-9a65-9ed23137a1db",
11+
"x": 3387.685164014321,
12+
"y": 1555.9484844037624,
13+
"width": 111.7109375,
14+
"height": 96,
15+
"nodeType": "Shape",
16+
"nodeInfo": {
17+
"type": "json-node",
18+
"formValues": {
19+
"json": "{ \n \"contents\": [{\n \"parts\": [\n {\"text\": \"create an image of a swedish house in sweden with a wood and lake as a background\"}\n ]\n }],\n \"generationConfig\":{\"responseModalities\":[\"Text\",\"Image\"]}\n}"
20+
}
21+
}
22+
},
23+
{
24+
"id": "e8bad215-deb0-42d9-a3e1-156090717777",
25+
"x": 3660.8090486879837,
26+
"y": 1511.6353941191269,
27+
"width": 200,
28+
"height": 200,
29+
"nodeType": "Shape",
30+
"nodeInfo": {
31+
"type": "fetch",
32+
"formValues": {
33+
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent?key=[googleGeminiAI-key]",
34+
"http-method": "post",
35+
"headers": ""
36+
}
37+
}
38+
},
39+
{
40+
"id": "c3f0b94c-dc5e-43a7-97df-3821d80f8911",
41+
"x": 4173.849904003409,
42+
"y": 1545.6826955200447,
43+
"width": 119.9998022871814,
44+
"height": 272.0000645247797,
45+
"nodeType": "Shape",
46+
"nodeInfo": {
47+
"type": "show-input",
48+
"formValues": {
49+
"name": "",
50+
"data-type": "default"
51+
}
52+
}
53+
},
54+
{
55+
"id": "a80b1437-8d7e-479b-946f-a8903b429c2b",
56+
"x": 5109.358235373969,
57+
"y": 1542.6407596879426,
58+
"width": 256,
59+
"height": 256,
60+
"nodeType": "Shape",
61+
"nodeInfo": {
62+
"type": "show-image",
63+
"formValues": {
64+
"image": "",
65+
"styling": "{\n \n }"
66+
}
67+
}
68+
},
69+
{
70+
"id": "0b13e7f5-8e15-4923-9baa-d238fccaac8d",
71+
"x": 4640.955442439913,
72+
"y": 1542.6407660219656,
73+
"width": 200,
74+
"height": 100,
75+
"nodeType": "Shape",
76+
"nodeInfo": {
77+
"type": "expression",
78+
"formValues": {
79+
"expression": "candidates[0].content.parts[0].inlineData.data",
80+
"inputType": "number"
81+
}
82+
}
83+
},
84+
{
85+
"id": "6a22f828-b47c-4123-bde9-6ebe2940cc0a",
86+
"x": 3499.396101514321,
87+
"y": 1603.9484844037624,
88+
"endX": 3660.8090486879837,
89+
"endY": 1611.6353941191269,
90+
"startNodeId": "1bc4104f-6c09-4bd2-9a65-9ed23137a1db",
91+
"endNodeId": "e8bad215-deb0-42d9-a3e1-156090717777",
92+
"startThumbName": "output",
93+
"endThumbName": "input",
94+
"lineType": "BezierCubic",
95+
"nodeType": "Connection",
96+
"layer": 1,
97+
"nodeInfo": {}
98+
},
99+
{
100+
"id": "41770511-b5bf-4014-9b95-1dee2abd53de",
101+
"x": 3860.8090486879837,
102+
"y": 1541.6353941191269,
103+
"endX": 4173.849904003409,
104+
"endY": 1575.6826955200447,
105+
"startNodeId": "e8bad215-deb0-42d9-a3e1-156090717777",
106+
"endNodeId": "c3f0b94c-dc5e-43a7-97df-3821d80f8911",
107+
"startThumbName": "output",
108+
"endThumbName": "input",
109+
"lineType": "BezierCubic",
110+
"nodeType": "Connection",
111+
"layer": 1,
112+
"nodeInfo": {}
113+
},
114+
{
115+
"id": "a306b026-8d6a-4e91-926a-64266dc986cd",
116+
"x": 4293.849706290591,
117+
"y": 1575.6826955200447,
118+
"endX": 4640.955442439913,
119+
"endY": 1592.6407660219656,
120+
"startNodeId": "c3f0b94c-dc5e-43a7-97df-3821d80f8911",
121+
"endNodeId": "0b13e7f5-8e15-4923-9baa-d238fccaac8d",
122+
"startThumbName": "output",
123+
"endThumbName": "input",
124+
"lineType": "BezierCubic",
125+
"nodeType": "Connection",
126+
"layer": 1,
127+
"nodeInfo": {}
128+
},
129+
{
130+
"id": "6a40e586-e2de-4fb5-aa1f-6cd263f5a6a0",
131+
"x": 4840.955442439913,
132+
"y": 1592.6407660219656,
133+
"endX": 5109.358235373969,
134+
"endY": 1572.6407596879426,
135+
"startNodeId": "0b13e7f5-8e15-4923-9baa-d238fccaac8d",
136+
"endNodeId": "a80b1437-8d7e-479b-946f-a8903b429c2b",
137+
"startThumbName": "output",
138+
"endThumbName": "input",
139+
"lineType": "BezierCubic",
140+
"nodeType": "Connection",
141+
"layer": 1,
142+
"nodeInfo": {}
143+
}
144+
]
145+
}
146+
},
147+
"compositions": {}
148+
}

0 commit comments

Comments
 (0)