@fugood/bricks-project 2.23.0-beta.2 → 2.23.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compile/action-name-map.ts +8 -0
- package/package.json +2 -2
- package/types/bricks/GenerativeMedia.ts +4 -2
- package/types/bricks/Slideshow.ts +37 -2
- package/types/data-calc.ts +1 -0
- package/types/generators/CanvasMap.ts +14 -3
- package/types/generators/Iterator.ts +9 -2
- package/types/generators/Keyboard.ts +10 -6
- package/types/generators/LlmGgml.ts +22 -5
- package/types/generators/LlmOnnx.ts +7 -0
- package/types/generators/Question.ts +7 -0
- package/types/generators/RerankerGgml.ts +21 -16
- package/types/generators/SqLite.ts +30 -1
- package/types/generators/TextToSpeechGgml.ts +22 -3
- package/types/generators/Tick.ts +3 -1
- package/types/generators/VectorStore.ts +13 -2
- package/types/generators/WebCrawler.ts +1 -1
- package/utils/event-props.ts +40 -4
|
@@ -512,6 +512,13 @@ export const templateActionNameMap = {
|
|
|
512
512
|
params: 'GENERATOR_SQLITE_PARAMS',
|
|
513
513
|
paramsString: 'GENERATOR_SQLITE_PARAMS_STRING',
|
|
514
514
|
},
|
|
515
|
+
GENERATOR_SQLITE_TRANSACTION: {
|
|
516
|
+
statements: 'GENERATOR_SQLITE_STATEMENTS',
|
|
517
|
+
},
|
|
518
|
+
GENERATOR_SQLITE_BATCH_EXECUTE: {
|
|
519
|
+
sql: 'GENERATOR_SQLITE_SQL',
|
|
520
|
+
batchParams: 'GENERATOR_SQLITE_BATCH_PARAMS',
|
|
521
|
+
},
|
|
515
522
|
},
|
|
516
523
|
|
|
517
524
|
GENERATOR_MCP: {
|
|
@@ -553,6 +560,7 @@ export const templateActionNameMap = {
|
|
|
553
560
|
prompt: 'GENERATOR_ONNX_LLM_PROMPT',
|
|
554
561
|
chat: 'GENERATOR_ONNX_LLM_CHAT',
|
|
555
562
|
images: 'GENERATOR_ONNX_LLM_IMAGES',
|
|
563
|
+
audios: 'GENERATOR_ONNX_LLM_AUDIOS',
|
|
556
564
|
tools: 'GENERATOR_ONNX_LLM_TOOLS',
|
|
557
565
|
toolChoice: 'GENERATOR_ONNX_LLM_TOOL_CHOICE',
|
|
558
566
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.23.0-beta.
|
|
3
|
+
"version": "2.23.0-beta.22",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node scripts/build.js"
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"lodash": "^4.17.4",
|
|
15
15
|
"uuid": "^8.3.1"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "d0a0fe0012e6938d1e756e0c6ef04759e997e138"
|
|
18
18
|
}
|
|
@@ -44,8 +44,8 @@ Default property:
|
|
|
44
44
|
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
|
|
45
45
|
/* The API key for the generative media service */
|
|
46
46
|
apiKey?: string | DataLink
|
|
47
|
-
/* The AI provider to use for generation (openai, freepik, or
|
|
48
|
-
provider?: 'openai' | 'freepik-classic' | 'deepai' | DataLink
|
|
47
|
+
/* The AI provider to use for generation (openai, freepik-classic, deepai, or gemini) */
|
|
48
|
+
provider?: 'openai' | 'freepik-classic' | 'deepai' | 'gemini' | DataLink
|
|
49
49
|
/* OpenAI image size (256x256, 512x512, 1024x1024, etc) */
|
|
50
50
|
openaiSize?: '1024x1024' | '1024x1792' | '1792x1024' | DataLink
|
|
51
51
|
/* OpenAI image style (vivid or natural) */
|
|
@@ -158,6 +158,8 @@ Default property:
|
|
|
158
158
|
deepaiWidth?: number | DataLink
|
|
159
159
|
/* DeepAI output image height */
|
|
160
160
|
deepaiHeight?: number | DataLink
|
|
161
|
+
/* Gemini aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3) */
|
|
162
|
+
geminiAspectRatio?: '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | DataLink
|
|
161
163
|
}
|
|
162
164
|
events?: BrickBasicEvents & {
|
|
163
165
|
/* Event of the brick press */
|
|
@@ -34,6 +34,26 @@ export type BrickSlideshowActionJumpToIndex = ActionWithParams & {
|
|
|
34
34
|
>
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/* Play the slideshow (resume if paused) */
|
|
38
|
+
export type BrickSlideshowActionPlay = Action & {
|
|
39
|
+
__actionName: 'BRICK_SLIDESHOW_PLAY'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Pause the slideshow */
|
|
43
|
+
export type BrickSlideshowActionPause = Action & {
|
|
44
|
+
__actionName: 'BRICK_SLIDESHOW_PAUSE'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Go to next slide */
|
|
48
|
+
export type BrickSlideshowActionNext = Action & {
|
|
49
|
+
__actionName: 'BRICK_SLIDESHOW_NEXT'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Go to previous slide */
|
|
53
|
+
export type BrickSlideshowActionPrev = Action & {
|
|
54
|
+
__actionName: 'BRICK_SLIDESHOW_PREV'
|
|
55
|
+
}
|
|
56
|
+
|
|
37
57
|
interface BrickSlideshowDef {
|
|
38
58
|
/*
|
|
39
59
|
Default property:
|
|
@@ -41,17 +61,28 @@ Default property:
|
|
|
41
61
|
"countdown": 2000,
|
|
42
62
|
"loop": true,
|
|
43
63
|
"shuffle": false,
|
|
64
|
+
"photoResizeMode": "contain",
|
|
65
|
+
"photoLoadSystemIos": "auto",
|
|
66
|
+
"photoLoadSystemAndroid": "auto",
|
|
67
|
+
"videoResizeMode": "contain",
|
|
68
|
+
"videoAutoAspectRatio": false,
|
|
44
69
|
"videoVolume": 100,
|
|
70
|
+
"videoMuted": false,
|
|
71
|
+
"videoRenderMode": "auto",
|
|
72
|
+
"fadeDuration": 0,
|
|
45
73
|
"emptyViewText": "no available image item to show",
|
|
46
74
|
"emptyViewTextSize": 44,
|
|
47
75
|
"emptyViewTextColor": "#fff",
|
|
76
|
+
"enableBlurBackground": false,
|
|
48
77
|
"blurBackgroundRadius": 8
|
|
49
78
|
}
|
|
50
79
|
*/
|
|
51
80
|
property?: BrickBasicProperty & {
|
|
52
81
|
/* The time interval of show for each photo */
|
|
53
82
|
countdown?: number | DataLink
|
|
54
|
-
/* The slideshow media path list (File, URL)
|
|
83
|
+
/* The slideshow media path list (File, URL)
|
|
84
|
+
Each path object can override global photo/video settings.
|
|
85
|
+
Item-level properties take precedence over brick-level properties. */
|
|
55
86
|
paths?:
|
|
56
87
|
| Array<
|
|
57
88
|
| DataLink
|
|
@@ -70,7 +101,8 @@ Default property:
|
|
|
70
101
|
}
|
|
71
102
|
>
|
|
72
103
|
| DataLink
|
|
73
|
-
/* Multiple slideshow media path lists to combine (Array of path arrays)
|
|
104
|
+
/* Multiple slideshow media path lists to combine (Array of path arrays).
|
|
105
|
+
All arrays are flattened and combined: [...paths, ...pathsList[0], ...pathsList[1], ...] */
|
|
74
106
|
pathsList?: Array<Array<any> | DataLink | DataLink> | DataLink
|
|
75
107
|
/* Loop the slideshow */
|
|
76
108
|
loop?: boolean | DataLink
|
|
@@ -122,6 +154,8 @@ Default property:
|
|
|
122
154
|
roundEnd?: Array<EventAction>
|
|
123
155
|
/* Event of the slideshow on load */
|
|
124
156
|
mediaOnLoad?: Array<EventAction>
|
|
157
|
+
/* Event of the slideshow media loading error */
|
|
158
|
+
mediaOnError?: Array<EventAction>
|
|
125
159
|
}
|
|
126
160
|
animation?: AnimationBasicEvents & {
|
|
127
161
|
changeStart?: Animation
|
|
@@ -129,6 +163,7 @@ Default property:
|
|
|
129
163
|
contentChange?: Animation
|
|
130
164
|
roundEnd?: Animation
|
|
131
165
|
mediaOnLoad?: Animation
|
|
166
|
+
mediaOnError?: Animation
|
|
132
167
|
}
|
|
133
168
|
}
|
|
134
169
|
|
package/types/data-calc.ts
CHANGED
|
@@ -5058,6 +5058,7 @@ export type DataCommandSandboxGetReturnValue = DataCommand & {
|
|
|
5058
5058
|
- coseVerify (cose.sign.verifySync from https://github.com/erdtman/COSE-JS)
|
|
5059
5059
|
- fflate (Not support async, callback and stream)
|
|
5060
5060
|
- iconv (Use iconv-lite)
|
|
5061
|
+
- OpenCC (Use opencc-js)
|
|
5061
5062
|
|
|
5062
5063
|
Android: Running on the sandbox of Hermes engine
|
|
5063
5064
|
|
|
@@ -31,10 +31,21 @@ Default property:
|
|
|
31
31
|
>
|
|
32
32
|
| DataLink
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
events?: {
|
|
35
|
+
/* Event triggered when a rule matches and canvas navigation occurs */
|
|
36
|
+
onNavigate?: Array<EventAction>
|
|
37
|
+
}
|
|
38
|
+
outlets?: {
|
|
39
|
+
/* Last matched trigger rule that caused canvas navigation */
|
|
40
|
+
lastMatchedRule?: () => Data
|
|
41
|
+
/* Index of the last matched rule in triggerList */
|
|
42
|
+
lastMatchedIndex?: () => Data
|
|
43
|
+
/* Total count of canvas navigations triggered by this generator */
|
|
44
|
+
navigationCount?: () => Data
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
|
|
37
|
-
/* Trigger
|
|
48
|
+
/* Trigger canvas navigation by setup rules */
|
|
38
49
|
export type GeneratorCanvasMap = Generator &
|
|
39
50
|
GeneratorCanvasMapDef & {
|
|
40
51
|
templateKey: 'GENERATOR_CANVAS_MAP'
|
|
@@ -48,7 +59,7 @@ export type GeneratorCanvasMap = Generator &
|
|
|
48
59
|
| SwitchCondData
|
|
49
60
|
| {
|
|
50
61
|
__typename: 'SwitchCondInnerStateOutlet'
|
|
51
|
-
outlet: ''
|
|
62
|
+
outlet: 'lastMatchedRule' | 'lastMatchedIndex' | 'navigationCount'
|
|
52
63
|
value: any
|
|
53
64
|
}
|
|
54
65
|
}>
|
|
@@ -19,6 +19,11 @@ export type GeneratorIteratorActionPrevious = Action & {
|
|
|
19
19
|
__actionName: 'GENERATOR_ITERATOR_PREVIOUS'
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/* Jump to the first iteration element */
|
|
23
|
+
export type GeneratorIteratorActionFirst = Action & {
|
|
24
|
+
__actionName: 'GENERATOR_ITERATOR_FIRST'
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
/* Jump to the last iteration element (ignoring the loop setting) */
|
|
23
28
|
export type GeneratorIteratorActionLast = Action & {
|
|
24
29
|
__actionName: 'GENERATOR_ITERATOR_LAST'
|
|
@@ -39,13 +44,13 @@ Default property:
|
|
|
39
44
|
}
|
|
40
45
|
*/
|
|
41
46
|
property?: {
|
|
42
|
-
/* Data source for iteration. If it's an Array, it will iterate through elements. If it's an Object, it will use Object.
|
|
47
|
+
/* Data source for iteration. If it's an Array, it will iterate through elements. If it's an Object, it will use Object.entries() to get key-value pairs. If it's a String, it will iterate through characters. If it's a Number, it represents count from 1 to N. */
|
|
43
48
|
data?: any
|
|
44
49
|
/* Starting element position */
|
|
45
50
|
start?: number | DataLink
|
|
46
51
|
/* Step size for each iteration */
|
|
47
52
|
step?: number | DataLink
|
|
48
|
-
/* Maximum number of iterations (can be set to -1 for unlimited) */
|
|
53
|
+
/* Maximum number of iterations (can be set to -1 for unlimited). When reached, further iteration actions will be silently ignored. */
|
|
49
54
|
maxQuantity?: number | DataLink
|
|
50
55
|
/* Whether to loop the iteration */
|
|
51
56
|
loop?: boolean | DataLink
|
|
@@ -57,6 +62,8 @@ Default property:
|
|
|
57
62
|
first?: Array<EventAction>
|
|
58
63
|
/* Event triggered on the last iteration of a round */
|
|
59
64
|
end?: Array<EventAction>
|
|
65
|
+
/* Event triggered when data type is invalid or unexpected */
|
|
66
|
+
error?: Array<EventAction>
|
|
60
67
|
}
|
|
61
68
|
outlets?: {
|
|
62
69
|
/* Elements that have been iterated (including current one) */
|
|
@@ -15,6 +15,7 @@ Default property:
|
|
|
15
15
|
{
|
|
16
16
|
"enabled": true,
|
|
17
17
|
"keyMap": {},
|
|
18
|
+
"keyOutletPrefer": "auto",
|
|
18
19
|
"batchStopKeys": [
|
|
19
20
|
13
|
|
20
21
|
],
|
|
@@ -24,15 +25,18 @@ Default property:
|
|
|
24
25
|
property?: {
|
|
25
26
|
/* Enable listening for input */
|
|
26
27
|
enabled?: boolean | DataLink
|
|
27
|
-
/* Key map to transform key or key code to the designated content
|
|
28
|
+
/* Key map to transform key or key code to the designated content
|
|
29
|
+
Example: { 37: 'left', 38: 'up', 39: 'right', 40: 'down', 'Enter': 'confirm' }
|
|
30
|
+
Supports both key codes (numbers) and key names (strings) as keys */
|
|
28
31
|
keyMap?: {} | DataLink
|
|
29
32
|
/* Key outlet preference use key code or key. */
|
|
30
33
|
keyOutletPrefer?: 'auto' | 'key-code' | 'key' | DataLink
|
|
31
|
-
/* Key or code to finish
|
|
34
|
+
/* Key or code to finish batch input
|
|
35
|
+
Common values: 13 (Enter), 27 (Escape), 'Enter', 'Escape' */
|
|
32
36
|
batchStopKeys?: Array<string | DataLink | number | DataLink | DataLink> | DataLink
|
|
33
|
-
/* Debounce time (ms) to finish
|
|
37
|
+
/* Debounce time (ms) to finish batch input */
|
|
34
38
|
batchDebounce?: number | DataLink
|
|
35
|
-
/* Maximum wait time (ms) to finish
|
|
39
|
+
/* Maximum wait time (ms) to finish batch input (default: unlimited) */
|
|
36
40
|
batchDebounceMaxWait?: number | DataLink
|
|
37
41
|
}
|
|
38
42
|
events?: {
|
|
@@ -40,7 +44,7 @@ Default property:
|
|
|
40
44
|
onDown?: Array<EventAction>
|
|
41
45
|
/* Event on key up */
|
|
42
46
|
onUp?: Array<EventAction>
|
|
43
|
-
/* Event on
|
|
47
|
+
/* Event on batch input complete */
|
|
44
48
|
onBatch?: Array<EventAction>
|
|
45
49
|
}
|
|
46
50
|
outlets?: {
|
|
@@ -52,7 +56,7 @@ Default property:
|
|
|
52
56
|
lastKeyUp?: () => Data
|
|
53
57
|
/* Modifier key information on last key release */
|
|
54
58
|
lastKeyUpFlags?: () => Data
|
|
55
|
-
/* Last
|
|
59
|
+
/* Last batch event */
|
|
56
60
|
lastBatchEvents?: () => Data
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -382,6 +382,11 @@ export type GeneratorLLMActionStopCompletion = Action & {
|
|
|
382
382
|
__actionName: 'GENERATOR_LLM_STOP_COMPLETION'
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
+
/* Clear KV cache */
|
|
386
|
+
export type GeneratorLLMActionClearCache = Action & {
|
|
387
|
+
__actionName: 'GENERATOR_LLM_CLEAR_CACHE'
|
|
388
|
+
}
|
|
389
|
+
|
|
385
390
|
/* Clear downloaded models & current jobs */
|
|
386
391
|
export type GeneratorLLMActionClearDownload = Action & {
|
|
387
392
|
__actionName: 'GENERATOR_LLM_CLEAR_DOWNLOAD'
|
|
@@ -483,8 +488,16 @@ Default property:
|
|
|
483
488
|
/* Accelerator variant (Only for desktop)
|
|
484
489
|
`default` - CPU / Metal (macOS)
|
|
485
490
|
`vulkan` - Use Vulkan
|
|
486
|
-
`cuda` - Use CUDA
|
|
487
|
-
|
|
491
|
+
`cuda` - Use CUDA
|
|
492
|
+
`snapdragon` - Use OpenCL/Hexagon of Qualcomm Snapdragon */
|
|
493
|
+
accelVariant?: 'default' | 'vulkan' | 'cuda' | 'snapdragon' | DataLink
|
|
494
|
+
/* Devices. For example:
|
|
495
|
+
|
|
496
|
+
Metal or CPU for iOS/tvOS/MacOS
|
|
497
|
+
OpenCL or CPU for Android
|
|
498
|
+
- Add `HTP0`, `HTP1`, `...` for OpenCL/Hexagon devices (Use HTP* for all HTP devices)
|
|
499
|
+
For Desktop, you may want to include/exclude GPUs */
|
|
500
|
+
devices?: Array<string | DataLink> | DataLink
|
|
488
501
|
/* Main GPU index */
|
|
489
502
|
mainGpu?: number | DataLink
|
|
490
503
|
/* Number of GPU layers */
|
|
@@ -637,9 +650,10 @@ Default property:
|
|
|
637
650
|
buttressConnectionSettings?:
|
|
638
651
|
| DataLink
|
|
639
652
|
| {
|
|
653
|
+
enabled?: boolean | DataLink
|
|
640
654
|
url?: string | DataLink
|
|
641
|
-
trpcPath?: string | DataLink
|
|
642
655
|
fallbackType?: 'use-local' | 'no-op' | DataLink
|
|
656
|
+
strategy?: 'prefer-local' | 'prefer-buttress' | 'prefer-best' | DataLink
|
|
643
657
|
}
|
|
644
658
|
}
|
|
645
659
|
events?: {
|
|
@@ -690,8 +704,11 @@ Default property:
|
|
|
690
704
|
- The device RAM must be larger than 8GB
|
|
691
705
|
- iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
|
|
692
706
|
- macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
|
|
693
|
-
- Android: Recommended use Android 13+ system.
|
|
694
|
-
|
|
707
|
+
- Android: Recommended use Android 13+ system.
|
|
708
|
+
- Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
|
|
709
|
+
- Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 1+ GPUs.
|
|
710
|
+
- Linux / Windows [@nextline - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
|
|
711
|
+
- Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux) */
|
|
695
712
|
export type GeneratorLLM = Generator &
|
|
696
713
|
GeneratorLLMDef & {
|
|
697
714
|
templateKey: 'GENERATOR_LLM'
|
|
@@ -33,6 +33,11 @@ export type GeneratorOnnxLLMActionInfer = ActionWithParams & {
|
|
|
33
33
|
value?: Array<any> | DataLink | EventProperty
|
|
34
34
|
mapping?: string
|
|
35
35
|
}
|
|
36
|
+
| {
|
|
37
|
+
input: 'audios'
|
|
38
|
+
value?: Array<any> | DataLink | EventProperty
|
|
39
|
+
mapping?: string
|
|
40
|
+
}
|
|
36
41
|
| {
|
|
37
42
|
input: 'tools'
|
|
38
43
|
value?: Array<any> | DataLink | EventProperty
|
|
@@ -99,6 +104,8 @@ Default property:
|
|
|
99
104
|
messages?: Array<DataLink | {}> | DataLink
|
|
100
105
|
/* Images with message to inference */
|
|
101
106
|
images?: Array<string | DataLink> | DataLink
|
|
107
|
+
/* Audios with message to inference */
|
|
108
|
+
audios?: Array<string | DataLink> | DataLink
|
|
102
109
|
/* Tool call parser */
|
|
103
110
|
toolCallParser?: 'llama3_json' | 'mistral' | 'hermes' | 'internlm' | 'phi4' | DataLink
|
|
104
111
|
/* Tools for chat mode using OpenAI-compatible function calling format
|
|
@@ -252,6 +252,13 @@ Default property:
|
|
|
252
252
|
manuallyStart?: boolean | DataLink
|
|
253
253
|
recordDuration?: number | DataLink
|
|
254
254
|
}
|
|
255
|
+
codeScanOptions?:
|
|
256
|
+
| DataLink
|
|
257
|
+
| {
|
|
258
|
+
inputSource?: 'camera' | 'hid-barcode-scanner' | DataLink
|
|
259
|
+
hidFlushMode?: 'enter-key' | 'timeout' | DataLink
|
|
260
|
+
hidFlushTimeout?: number | DataLink
|
|
261
|
+
}
|
|
255
262
|
messageOptions?:
|
|
256
263
|
| DataLink
|
|
257
264
|
| {
|
|
@@ -67,18 +67,19 @@ Default property:
|
|
|
67
67
|
batchSize?: number | DataLink
|
|
68
68
|
/* Physical maximum batch size (default: 512) */
|
|
69
69
|
uBatchSize?: number | DataLink
|
|
70
|
-
/*
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
70
|
+
/* GGML accelerator variant (Only for desktop)
|
|
71
|
+
`default` - CPU / Metal (macOS)
|
|
72
|
+
`vulkan` - Use Vulkan
|
|
73
|
+
`cuda` - Use CUDA
|
|
74
|
+
`snapdragon` - Use OpenCL/Hexagon of Qualcomm Snapdragon */
|
|
75
|
+
accelVariant?: 'default' | 'vulkan' | 'cuda' | 'snapdragon' | DataLink
|
|
76
|
+
/* Devices. For example:
|
|
77
|
+
|
|
78
|
+
Metal or CPU for iOS/tvOS/MacOS
|
|
79
|
+
OpenCL or CPU for Android
|
|
80
|
+
- Add `HTP0`, `HTP1`, `...` for OpenCL/Hexagon devices (Use HTP* for all HTP devices)
|
|
81
|
+
For Desktop, you may want to include/exclude GPUs */
|
|
82
|
+
devices?: Array<string | DataLink> | DataLink
|
|
82
83
|
/* Main GPU index (default: 0) */
|
|
83
84
|
mainGpu?: number | DataLink
|
|
84
85
|
/* Number of layers to store in VRAM (default: 0) */
|
|
@@ -122,10 +123,14 @@ Default property:
|
|
|
122
123
|
|
|
123
124
|
## Notice
|
|
124
125
|
- The device RAM must be larger than 8GB
|
|
125
|
-
- iOS:
|
|
126
|
-
- macOS:
|
|
127
|
-
- Android:
|
|
128
|
-
|
|
126
|
+
- iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
|
|
127
|
+
- macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
|
|
128
|
+
- Android: Recommended use Android 13+ system.
|
|
129
|
+
- Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
|
|
130
|
+
- Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 2+ GPUs.
|
|
131
|
+
- Linux / Windows
|
|
132
|
+
- Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
|
|
133
|
+
- Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux) */
|
|
129
134
|
export type GeneratorReranker = Generator &
|
|
130
135
|
GeneratorRerankerDef & {
|
|
131
136
|
templateKey: 'GENERATOR_RERANKER'
|
|
@@ -53,6 +53,33 @@ export type GeneratorSqliteActionQuery = ActionWithParams & {
|
|
|
53
53
|
>
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/* Execute multiple SQL statements in transaction */
|
|
57
|
+
export type GeneratorSqliteActionTransaction = ActionWithParams & {
|
|
58
|
+
__actionName: 'GENERATOR_SQLITE_TRANSACTION'
|
|
59
|
+
params?: Array<{
|
|
60
|
+
input: 'statements'
|
|
61
|
+
value?: Array<any> | DataLink | EventProperty
|
|
62
|
+
mapping?: string
|
|
63
|
+
}>
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Execute same SQL statement with multiple parameter sets */
|
|
67
|
+
export type GeneratorSqliteActionBatchExecute = ActionWithParams & {
|
|
68
|
+
__actionName: 'GENERATOR_SQLITE_BATCH_EXECUTE'
|
|
69
|
+
params?: Array<
|
|
70
|
+
| {
|
|
71
|
+
input: 'sql'
|
|
72
|
+
value?: string | DataLink | EventProperty
|
|
73
|
+
mapping?: string
|
|
74
|
+
}
|
|
75
|
+
| {
|
|
76
|
+
input: 'batchParams'
|
|
77
|
+
value?: Array<any> | DataLink | EventProperty
|
|
78
|
+
mapping?: string
|
|
79
|
+
}
|
|
80
|
+
>
|
|
81
|
+
}
|
|
82
|
+
|
|
56
83
|
interface GeneratorSqliteDef {
|
|
57
84
|
/*
|
|
58
85
|
Default property:
|
|
@@ -92,6 +119,8 @@ Default property:
|
|
|
92
119
|
error?: () => Data
|
|
93
120
|
/* Last query result */
|
|
94
121
|
lastResult?: () => Data
|
|
122
|
+
/* Last execute result with metadata */
|
|
123
|
+
lastExecuteResult?: () => Data
|
|
95
124
|
}
|
|
96
125
|
}
|
|
97
126
|
|
|
@@ -109,7 +138,7 @@ export type GeneratorSqlite = Generator &
|
|
|
109
138
|
| SwitchCondData
|
|
110
139
|
| {
|
|
111
140
|
__typename: 'SwitchCondInnerStateOutlet'
|
|
112
|
-
outlet: 'isReady' | 'dbPath' | 'error' | 'lastResult'
|
|
141
|
+
outlet: 'isReady' | 'dbPath' | 'error' | 'lastResult' | 'lastExecuteResult'
|
|
113
142
|
value: any
|
|
114
143
|
}
|
|
115
144
|
}>
|
|
@@ -129,8 +129,16 @@ Default property:
|
|
|
129
129
|
/* Accelerator variant (Only for desktop)
|
|
130
130
|
`default` - CPU / Metal (macOS)
|
|
131
131
|
`vulkan` - Use Vulkan
|
|
132
|
-
`cuda` - Use CUDA
|
|
133
|
-
|
|
132
|
+
`cuda` - Use CUDA
|
|
133
|
+
`snapdragon` - Use OpenCL/Hexagon of Qualcomm Snapdragon */
|
|
134
|
+
accelVariant?: 'default' | 'vulkan' | 'cuda' | 'snapdragon' | DataLink
|
|
135
|
+
/* Devices. For example:
|
|
136
|
+
|
|
137
|
+
Metal or CPU for iOS/tvOS/MacOS
|
|
138
|
+
OpenCL or CPU for Android
|
|
139
|
+
- Add `HTP0`, `HTP1`, `...` for OpenCL/Hexagon devices (Use HTP* for all HTP devices)
|
|
140
|
+
For Desktop, you may want to include/exclude GPUs */
|
|
141
|
+
devices?: Array<string | DataLink> | DataLink
|
|
134
142
|
/* Main GPU index */
|
|
135
143
|
mainGpu?: number | DataLink
|
|
136
144
|
/* Number of GPU layers (NOTE: Currently not supported for Android) */
|
|
@@ -159,7 +167,18 @@ Default property:
|
|
|
159
167
|
}
|
|
160
168
|
|
|
161
169
|
/* Local Text-to-Speech (TTS) inference based on GGML and [llama.cpp](https://github.com/ggerganov/llama.cpp)
|
|
162
|
-
You can use any converted model on HuggingFace.
|
|
170
|
+
You can use any converted model on HuggingFace.
|
|
171
|
+
|
|
172
|
+
## Notice
|
|
173
|
+
- The device RAM must be larger than 8GB
|
|
174
|
+
- iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
|
|
175
|
+
- macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
|
|
176
|
+
- Android: Recommended use Android 13+ system.
|
|
177
|
+
- Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
|
|
178
|
+
- Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 2+ GPUs.
|
|
179
|
+
- Linux / Windows
|
|
180
|
+
- Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
|
|
181
|
+
- Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux) */
|
|
163
182
|
export type GeneratorGGMLTTS = Generator &
|
|
164
183
|
GeneratorGGMLTTSDef & {
|
|
165
184
|
templateKey: 'GENERATOR_GGML_TTS'
|
package/types/generators/Tick.ts
CHANGED
|
@@ -49,6 +49,8 @@ Default property:
|
|
|
49
49
|
outlets?: {
|
|
50
50
|
/* Countdown step value */
|
|
51
51
|
countdown?: () => Data
|
|
52
|
+
/* Is tick running? */
|
|
53
|
+
running?: () => Data
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -66,7 +68,7 @@ export type GeneratorTick = Generator &
|
|
|
66
68
|
| SwitchCondData
|
|
67
69
|
| {
|
|
68
70
|
__typename: 'SwitchCondInnerStateOutlet'
|
|
69
|
-
outlet: 'countdown'
|
|
71
|
+
outlet: 'countdown' | 'running'
|
|
70
72
|
value: any
|
|
71
73
|
}
|
|
72
74
|
}>
|
|
@@ -159,8 +159,19 @@ Default property:
|
|
|
159
159
|
ggmlContextSize?: number | DataLink
|
|
160
160
|
/* Pooling type of ggml model */
|
|
161
161
|
ggmlPoolingType?: 'none' | 'mean' | 'cls' | 'last' | 'rank' | DataLink
|
|
162
|
-
/*
|
|
163
|
-
|
|
162
|
+
/* GGML accelerator variant (Only for desktop)
|
|
163
|
+
`default` - CPU / Metal (macOS)
|
|
164
|
+
`vulkan` - Use Vulkan
|
|
165
|
+
`cuda` - Use CUDA
|
|
166
|
+
`snapdragon` - Use OpenCL/Hexagon of Qualcomm Snapdragon */
|
|
167
|
+
ggmlAccelVariant?: 'default' | 'vulkan' | 'cuda' | 'snapdragon' | DataLink
|
|
168
|
+
/* Devices. For example:
|
|
169
|
+
|
|
170
|
+
Metal or CPU for iOS/tvOS/MacOS
|
|
171
|
+
OpenCL or CPU for Android
|
|
172
|
+
- Add `HTP0`, `HTP1`, `...` for OpenCL/Hexagon devices (Use HTP* for all HTP devices)
|
|
173
|
+
For Desktop, you may want to include/exclude GPUs */
|
|
174
|
+
ggmlDevices?: Array<string | DataLink> | DataLink
|
|
164
175
|
/* Normalize */
|
|
165
176
|
ggmlEmbdNormalize?: number | DataLink
|
|
166
177
|
/* API key of OpenAI Compatible API */
|
|
@@ -29,7 +29,7 @@ Default property:
|
|
|
29
29
|
init?: boolean | DataLink
|
|
30
30
|
/* URL of crawler request */
|
|
31
31
|
url?: string | DataLink
|
|
32
|
-
/*
|
|
32
|
+
/* Method of crawler request
|
|
33
33
|
|
|
34
34
|
Platform not supported for `webview`: tvOS, Desktop, Web */
|
|
35
35
|
method?: 'webview' | 'http' | DataLink
|
package/utils/event-props.ts
CHANGED
|
@@ -55,6 +55,11 @@ export const templateEventPropsMap = {
|
|
|
55
55
|
'BRICK_SLIDESHOW_PAYLOAD_VALUE', // type: number
|
|
56
56
|
'BRICK_SLIDESHOW_ORIGINAL_INDEX', // type: number
|
|
57
57
|
],
|
|
58
|
+
mediaOnError: [
|
|
59
|
+
'BRICK_SLIDESHOW_ERROR_MESSAGE', // type: string
|
|
60
|
+
'BRICK_SLIDESHOW_ERROR_URL', // type: string
|
|
61
|
+
'BRICK_SLIDESHOW_ERROR_INDEX', // type: number
|
|
62
|
+
],
|
|
58
63
|
},
|
|
59
64
|
BRICK_CHART: {
|
|
60
65
|
onPress: [
|
|
@@ -234,7 +239,7 @@ export const templateEventPropsMap = {
|
|
|
234
239
|
'GENERATOR_ALARM_CLOCK_CURRENT_TIME', // type: string
|
|
235
240
|
'GENERATOR_ALARM_CLOCK_CURRENT_TIMESTAMP', // type: number
|
|
236
241
|
'GENERATOR_ALARM_CLOCK_REASON', // type: string
|
|
237
|
-
'GENERATOR_ALARM_CLOCK_MAX_TRIGS', // type:
|
|
242
|
+
'GENERATOR_ALARM_CLOCK_MAX_TRIGS', // type: number
|
|
238
243
|
'GENERATOR_ALARM_CLOCK_STOP_AT', // type: string
|
|
239
244
|
],
|
|
240
245
|
},
|
|
@@ -371,7 +376,16 @@ export const templateEventPropsMap = {
|
|
|
371
376
|
'GENERATOR_WEB_SOCKET_MESSAGE', // type: any
|
|
372
377
|
],
|
|
373
378
|
},
|
|
374
|
-
|
|
379
|
+
GENERATOR_CANVAS_MAP: {
|
|
380
|
+
onNavigate: [
|
|
381
|
+
'GENERATOR_CANVAS_MAP_MATCHED_RULE', // type: object
|
|
382
|
+
'GENERATOR_CANVAS_MAP_MATCHED_INDEX', // type: number
|
|
383
|
+
'GENERATOR_CANVAS_MAP_TARGET_CANVAS_ID', // type: string
|
|
384
|
+
'GENERATOR_CANVAS_MAP_TARGET_CANVAS_TITLE_LIKE', // type: string
|
|
385
|
+
'GENERATOR_CANVAS_MAP_PROPERTY_VALUE', // type: any
|
|
386
|
+
'GENERATOR_CANVAS_MAP_PREVIOUS_VALUE', // type: any
|
|
387
|
+
],
|
|
388
|
+
},
|
|
375
389
|
GENERATOR_STEP: {
|
|
376
390
|
onStep: [
|
|
377
391
|
'GENERATOR_STEP_PAYLOAD', // type: string
|
|
@@ -382,7 +396,21 @@ export const templateEventPropsMap = {
|
|
|
382
396
|
iterate: [
|
|
383
397
|
'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
|
|
384
398
|
'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
|
|
385
|
-
'GENERATOR_ITERATOR_ITERATE_INDEX', // type:
|
|
399
|
+
'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
|
|
400
|
+
],
|
|
401
|
+
first: [
|
|
402
|
+
'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
|
|
403
|
+
'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
|
|
404
|
+
'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
|
|
405
|
+
],
|
|
406
|
+
end: [
|
|
407
|
+
'GENERATOR_ITERATOR_ITERATE_VALUE', // type: any
|
|
408
|
+
'GENERATOR_ITERATOR_ITERATE_KEY', // type: any
|
|
409
|
+
'GENERATOR_ITERATOR_ITERATE_INDEX', // type: number
|
|
410
|
+
],
|
|
411
|
+
error: [
|
|
412
|
+
'GENERATOR_ITERATOR_ERROR_MESSAGE', // type: string
|
|
413
|
+
'GENERATOR_ITERATOR_ERROR_DATA', // type: any
|
|
386
414
|
],
|
|
387
415
|
},
|
|
388
416
|
GENERATOR_WATCHDOG: {
|
|
@@ -821,7 +849,15 @@ export const templateEventPropsMap = {
|
|
|
821
849
|
'GENERATOR_GGML_TTS_ERROR', // type: string
|
|
822
850
|
],
|
|
823
851
|
},
|
|
824
|
-
GENERATOR_RERANKER: {
|
|
852
|
+
GENERATOR_RERANKER: {
|
|
853
|
+
onContextStateChange: [
|
|
854
|
+
'GENERATOR_RERANKER_CONTEXT_STATE', // type: string
|
|
855
|
+
'GENERATOR_RERANKER_CONTEXT_DETAILS', // type: object
|
|
856
|
+
],
|
|
857
|
+
onError: [
|
|
858
|
+
'GENERATOR_RERANKER_ERROR', // type: string
|
|
859
|
+
],
|
|
860
|
+
},
|
|
825
861
|
GENERATOR_QNN_LLM: {
|
|
826
862
|
onContextStateChange: [
|
|
827
863
|
'GENERATOR_QNN_LLM_CONTEXT_STATE', // type: string
|