File size: 7,127 Bytes
7910e77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
{
  "schema_version": "2",
  "name": "LFM3-1.7B — chat & extract",
  "references": [
    {
      "id": "ref_prompt",
      "label": "Prompt",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40,
      "y": 40,
      "width": 320,
      "height": 140,
      "data": {"out": "Explain how a heat pump works, in three sentences."}
    },
    {
      "id": "ref_system",
      "label": "System Prompt",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40,
      "y": 210,
      "width": 320,
      "height": 110,
      "data": {"out": "You are a helpful assistant trained by Liquid AI."}
    },
    {
      "id": "ref_preset",
      "label": "Preset (general | math)",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40,
      "y": 350,
      "width": 170,
      "height": 90,
      "data": {"out": "general"}
    },
    {
      "id": "ref_max_tokens",
      "label": "Max New Tokens",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 230,
      "y": 350,
      "width": 130,
      "height": 90,
      "data": {"out": "1024"}
    },
    {
      "id": "ref_thinking",
      "label": "Thinking (true | false)",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40,
      "y": 470,
      "width": 170,
      "height": 90,
      "data": {"out": "true"}
    },
    {
      "id": "ref_seed",
      "label": "Seed (0 = random)",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 230,
      "y": 470,
      "width": 130,
      "height": 90,
      "data": {"out": "0"}
    },
    {
      "id": "ref_messy",
      "label": "Messy Text",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40,
      "y": 610,
      "width": 320,
      "height": 140,
      "data": {"out": "Invoice 4521 — ACME Corp, billed 2026-10-11, amount due $1,299.50. Payment terms net 30. Contact: j.rivera@acme.example"}
    },
    {
      "id": "ref_fields",
      "label": "Fields to Extract",
      "role": "reference",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 40,
      "y": 780,
      "width": 320,
      "height": 90,
      "data": {"out": "invoice_number, company, billed_date, amount_due_usd, contact_email"}
    }
  ],
  "operators": [
    {
      "id": "op_chat",
      "label": "LFM3 Chat",
      "role": "operator",
      "kind": "fn",
      "fn": "lfm3_chat",
      "inputs": [
        {"id": "prompt", "label": "Prompt", "type": "text", "required": true},
        {"id": "system_prompt", "label": "System", "type": "text"},
        {"id": "preset", "label": "Preset", "type": "text"},
        {"id": "max_new_tokens", "label": "Max Tokens", "type": "text"},
        {"id": "enable_thinking", "label": "Thinking", "type": "text"},
        {"id": "seed", "label": "Seed", "type": "text"}
      ],
      "outputs": [{"id": "out_0", "label": "Reply", "type": "text", "output_index": 0}],
      "x": 480,
      "y": 120,
      "width": 230,
      "height": 190,
      "data": {}
    },
    {
      "id": "op_extract",
      "label": "LFM3 Extract JSON",
      "role": "operator",
      "kind": "fn",
      "fn": "lfm3_extract",
      "inputs": [
        {"id": "text", "label": "Text", "type": "text", "required": true},
        {"id": "fields", "label": "Fields", "type": "text", "required": true},
        {"id": "max_new_tokens", "label": "Max Tokens", "type": "text"},
        {"id": "seed", "label": "Seed", "type": "text"}
      ],
      "outputs": [{"id": "out_0", "label": "JSON", "type": "text", "output_index": 0}],
      "x": 480,
      "y": 640,
      "width": 230,
      "height": 160,
      "data": {}
    }
  ],
  "subjects": [
    {
      "id": "sub_reply",
      "label": "Reply",
      "role": "subject",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 780,
      "y": 150,
      "width": 260,
      "height": 110,
      "data": {}
    },
    {
      "id": "sub_json",
      "label": "Extracted JSON",
      "role": "subject",
      "asset_type": "text",
      "inputs": [{"id": "in", "label": "Text", "type": "text"}],
      "outputs": [{"id": "out", "label": "Text", "type": "text"}],
      "x": 780,
      "y": 670,
      "width": 260,
      "height": 110,
      "data": {}
    }
  ],
  "edges": [
    {"id": "e_prompt", "from_node_id": "ref_prompt", "from_port_id": "out", "to_node_id": "op_chat", "to_port_id": "prompt", "type": "text"},
    {"id": "e_system", "from_node_id": "ref_system", "from_port_id": "out", "to_node_id": "op_chat", "to_port_id": "system_prompt", "type": "text"},
    {"id": "e_preset", "from_node_id": "ref_preset", "from_port_id": "out", "to_node_id": "op_chat", "to_port_id": "preset", "type": "text"},
    {"id": "e_maxtok", "from_node_id": "ref_max_tokens", "from_port_id": "out", "to_node_id": "op_chat", "to_port_id": "max_new_tokens", "type": "text"},
    {"id": "e_thinking", "from_node_id": "ref_thinking", "from_port_id": "out", "to_node_id": "op_chat", "to_port_id": "enable_thinking", "type": "text"},
    {"id": "e_seed", "from_node_id": "ref_seed", "from_port_id": "out", "to_node_id": "op_chat", "to_port_id": "seed", "type": "text"},
    {"id": "e_reply", "from_node_id": "op_chat", "from_port_id": "out_0", "to_node_id": "sub_reply", "to_port_id": "in", "type": "text"},
    {"id": "e_messy", "from_node_id": "ref_messy", "from_port_id": "out", "to_node_id": "op_extract", "to_port_id": "text", "type": "text"},
    {"id": "e_fields", "from_node_id": "ref_fields", "from_port_id": "out", "to_node_id": "op_extract", "to_port_id": "fields", "type": "text"},
    {"id": "e_maxtok2", "from_node_id": "ref_max_tokens", "from_port_id": "out", "to_node_id": "op_extract", "to_port_id": "max_new_tokens", "type": "text"},
    {"id": "e_seed2", "from_node_id": "ref_seed", "from_port_id": "out", "to_node_id": "op_extract", "to_port_id": "seed", "type": "text"},
    {"id": "e_json", "from_node_id": "op_extract", "from_port_id": "out_0", "to_node_id": "sub_json", "to_port_id": "in", "type": "text"}
  ]
}