@fugood/bricks-project 2.22.4 → 2.22.6

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.
@@ -573,7 +573,6 @@ export const templateActionNameMap = {
573
573
  prompt: 'GENERATOR_ONNX_LLM_PROMPT',
574
574
  chat: 'GENERATOR_ONNX_LLM_CHAT',
575
575
  images: 'GENERATOR_ONNX_LLM_IMAGES',
576
- audios: 'GENERATOR_ONNX_LLM_AUDIOS',
577
576
  tools: 'GENERATOR_ONNX_LLM_TOOLS',
578
577
  toolChoice: 'GENERATOR_ONNX_LLM_TOOL_CHOICE',
579
578
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.22.4",
3
+ "version": "2.22.6",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -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 deepai) */
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 */
@@ -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
 
@@ -483,8 +483,16 @@ Default property:
483
483
  /* Accelerator variant (Only for desktop)
484
484
  `default` - CPU / Metal (macOS)
485
485
  `vulkan` - Use Vulkan
486
- `cuda` - Use CUDA */
487
- accelVariant?: 'default' | 'vulkan' | 'cuda' | DataLink
486
+ `cuda` - Use CUDA
487
+ `snapdragon` - Use OpenCL/Hexagon of Qualcomm Snapdragon */
488
+ accelVariant?: 'default' | 'vulkan' | 'cuda' | 'snapdragon' | DataLink
489
+ /* Devices. For example:
490
+
491
+ Metal or CPU for iOS/tvOS/MacOS
492
+ OpenCL or CPU for Android
493
+ - Add `HTP0`, `HTP1`, `...` for OpenCL/Hexagon devices (Use HTP* for all HTP devices)
494
+ For Desktop, you may want to include/exclude GPUs */
495
+ devices?: Array<string | DataLink> | DataLink
488
496
  /* Main GPU index */
489
497
  mainGpu?: number | DataLink
490
498
  /* Number of GPU layers */
@@ -682,8 +690,11 @@ Default property:
682
690
  - The device RAM must be larger than 8GB
683
691
  - iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
684
692
  - macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
685
- - Android: Recommended use Android 13+ system. Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
686
- - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property */
693
+ - Android: Recommended use Android 13+ system.
694
+ - Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
695
+ - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 1+ GPUs.
696
+ - Linux / Windows [@nextline - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
697
+ - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux) */
687
698
  export type GeneratorLLM = Generator &
688
699
  GeneratorLLMDef & {
689
700
  templateKey: 'GENERATOR_LLM'
@@ -33,11 +33,6 @@ 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
- }
41
36
  | {
42
37
  input: 'tools'
43
38
  value?: Array<any> | DataLink | EventProperty
@@ -104,8 +99,6 @@ Default property:
104
99
  messages?: Array<DataLink | {}> | DataLink
105
100
  /* Images with message to inference */
106
101
  images?: Array<string | DataLink> | DataLink
107
- /* Audios with message to inference */
108
- audios?: Array<string | DataLink> | DataLink
109
102
  /* Tool call parser */
110
103
  toolCallParser?: 'llama3_json' | 'mistral' | 'hermes' | 'internlm' | 'phi4' | DataLink
111
104
  /* 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
- /* Accelerator variant (default: default) */
71
- accelVariant?:
72
- | 'default'
73
- | 'avx'
74
- | 'avx2'
75
- | 'avx512'
76
- | 'metal'
77
- | 'opencl'
78
- | 'vulkan'
79
- | 'cuda'
80
- | 'rocm'
81
- | DataLink
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: Supported GPU acceleration, recommended use M1+ / A17+ chip device
126
- - macOS: Supported GPU acceleration, recommended use M1+ chip device
127
- - Android: Currently not supported GPU acceleration (Coming soon), recommended use Android 13+ system
128
- - Linux / Windows: Supported GPU acceleration, currently only Vulkan backend available */
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'
@@ -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
- accelVariant?: 'default' | 'vulkan' | 'cuda' | DataLink
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'
@@ -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
- /* Accelerator variant of ggml model */
163
- ggmlAccelVariant?: 'default' | 'vulkan' | 'cuda' | DataLink
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 */