File size: 5,559 Bytes
b228a1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38d6762
b228a1b
38d6762
 
 
b228a1b
 
38d6762
b228a1b
 
38d6762
b228a1b
 
 
 
 
 
 
 
 
38d6762
 
b228a1b
 
 
38d6762
b228a1b
38d6762
b228a1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38d6762
 
b228a1b
 
38d6762
b228a1b
38d6762
b228a1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38d6762
 
 
b228a1b
38d6762
b228a1b
38d6762
b228a1b
 
 
 
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
  "schema_version": "2",
  "name": "MiniCPM-V 4.7 Vision Workflows",
  "runtime": {"default": "client"},
  "references": [
    {
      "id": "ref-image",
      "role": "reference",
      "label": "Image",
      "asset_type": "image",
      "inputs": [{"id": "in", "label": "Image", "type": "image"}],
      "outputs": [{"id": "out", "label": "Image", "type": "image"}],
      "x": 80,
      "y": 100,
      "width": 220,
      "height": 220,
      "data": {"in": null, "out": null}
    },
    {
      "id": "ref-prompt",
      "role": "reference",
      "label": "Prompt",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Prompt", "type": "text"}],
      "outputs": [{"id": "out", "label": "Prompt", "type": "text"}],
      "x": 80,
      "y": 360,
      "width": 220,
      "height": 160,
      "data": {"in": "What is happening in this image?", "out": "What is happening in this image?"}
    },
    {
      "id": "ref-image-2",
      "role": "reference",
      "label": "Scene Image",
      "asset_type": "image",
      "inputs": [{"id": "in", "label": "Image", "type": "image"}],
      "outputs": [{"id": "out", "label": "Image", "type": "image"}],
      "x": 80,
      "y": 680,
      "width": 220,
      "height": 220,
      "data": {"in": null, "out": null}
    },
    {
      "id": "ref-caption-prompt",
      "role": "reference",
      "label": "Caption Prompt",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Prompt", "type": "text"}],
      "outputs": [{"id": "out", "label": "Prompt", "type": "text"}],
      "x": 80,
      "y": 940,
      "width": 220,
      "height": 160,
      "data": {"in": "Describe this image in one detailed paragraph.", "out": "Describe this image in one detailed paragraph."}
    }
  ],
  "operators": [
    {
      "id": "op-ask",
      "role": "operator",
      "kind": "fn",
      "fn": "ask",
      "label": "MiniCPM-V Ask",
      "inputs": [
        {"id": "image", "label": "Image", "type": "image", "required": true},
        {"id": "prompt", "label": "Prompt", "type": "text", "required": true},
        {"id": "temperature", "label": "Temperature", "type": "number", "required": false, "custom": true}
      ],
      "outputs": [{"id": "out_0", "label": "Text", "type": "text"}],
      "x": 380,
      "y": 180,
      "width": 260,
      "height": 240,
      "data": {"temperature": 0.7}
    },
    {
      "id": "op-caption",
      "role": "operator",
      "kind": "fn",
      "fn": "caption",
      "label": "MiniCPM-V Caption",
      "inputs": [
        {"id": "image", "label": "Image", "type": "image", "required": true},
        {"id": "prompt", "label": "Prompt", "type": "text", "required": true}
      ],
      "outputs": [{"id": "out_0", "label": "Caption", "type": "text"}],
      "x": 380,
      "y": 740,
      "width": 260,
      "height": 220
    },
    {
      "id": "op-compose",
      "role": "operator",
      "kind": "fn",
      "fn": "compose_extraction_prompt",
      "label": "Compose Extraction Prompt",
      "inputs": [
        {"id": "caption", "label": "Caption", "type": "text", "required": true}
      ],
      "outputs": [{"id": "out_0", "label": "Prompt", "type": "text"}],
      "x": 720,
      "y": 780,
      "width": 260,
      "height": 180
    },
    {
      "id": "op-extract",
      "role": "operator",
      "kind": "fn",
      "fn": "extract_json",
      "label": "MiniCPM-V Extract JSON",
      "inputs": [
        {"id": "prompt", "label": "Prompt", "type": "text", "required": true}
      ],
      "outputs": [{"id": "out_0", "label": "JSON", "type": "text"}],
      "x": 1060,
      "y": 760,
      "width": 260,
      "height": 220
    }
  ],
  "subjects": [
    {
      "id": "subj-answer",
      "role": "subject",
      "label": "Answer",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 720,
      "y": 200,
      "width": 320,
      "height": 200,
      "data": {"in": ""}
    },
    {
      "id": "subj-json",
      "role": "subject",
      "label": "Scene JSON",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 1400,
      "y": 780,
      "width": 320,
      "height": 200,
      "data": {"in": ""}
    }
  ],
  "edges": [
    {"id": "e1", "from_node_id": "ref-image", "from_port_id": "out", "to_node_id": "op-ask", "to_port_id": "image", "type": "image"},
    {"id": "e2", "from_node_id": "ref-prompt", "from_port_id": "out", "to_node_id": "op-ask", "to_port_id": "prompt", "type": "text"},
    {"id": "e3", "from_node_id": "op-ask", "from_port_id": "out_0", "to_node_id": "subj-answer", "to_port_id": "in", "type": "text"},
    {"id": "e4", "from_node_id": "ref-image-2", "from_port_id": "out", "to_node_id": "op-caption", "to_port_id": "image", "type": "image"},
    {"id": "e5", "from_node_id": "ref-caption-prompt", "from_port_id": "out", "to_node_id": "op-caption", "to_port_id": "prompt", "type": "text"},
    {"id": "e6", "from_node_id": "op-caption", "from_port_id": "out_0", "to_node_id": "op-compose", "to_port_id": "caption", "type": "text"},
    {"id": "e7", "from_node_id": "op-compose", "from_port_id": "out_0", "to_node_id": "op-extract", "to_port_id": "prompt", "type": "text"},
    {"id": "e8", "from_node_id": "op-extract", "from_port_id": "out_0", "to_node_id": "subj-json", "to_port_id": "in", "type": "text"}
  ],
  "view": {"default": "canvas"}
}