@fugood/bricks-project 2.22.0-beta.17 → 2.22.0-beta.18

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.
@@ -129,6 +129,12 @@ export const templateActionNameMap = {
129
129
  behavior: 'BEHAVIOR',
130
130
  exceptionMessage: 'EXCEPTION_MESSAGE',
131
131
  },
132
+ TRIGGER_APPLICATION_FILTER: {
133
+ name: 'NAME',
134
+ variables: 'VARIABLES',
135
+ result: 'RESULT',
136
+ error: 'ERROR',
137
+ },
132
138
  },
133
139
 
134
140
  BRICK_TEXT_INPUT: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.22.0-beta.17",
3
+ "version": "2.22.0-beta.18",
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": "5e8893af505fa5a7b1a902e11764c1f9ebb36a4f"
17
+ "gitHead": "3d0d19e21dcdb4a989e24f9ab8c69578c4c550fa"
18
18
  }
@@ -5519,6 +5519,7 @@ interface GeneratorSpeechInferenceDef {
5519
5519
  Default property:
5520
5520
  {
5521
5521
  "init": false,
5522
+ "accelVariant": "default",
5522
5523
  "modelName": "base-q8_0",
5523
5524
  "modelUseCoreML": false,
5524
5525
  "modelUseGPU": true,
@@ -5537,6 +5538,11 @@ Default property:
5537
5538
  /* Initialize the Whisper context on generator initialization
5538
5539
  Please note that it will take some RAM depending on the model size */
5539
5540
  init?: boolean | DataLink
5541
+ /* Accelerator variant (Only for desktop)
5542
+ `default` - CPU / Metal (macOS)
5543
+ `vulkan` - Use Vulkan
5544
+ `cuda` - Use CUDA */
5545
+ accelVariant?: 'default' | 'vulkan' | 'cuda' | DataLink
5540
5546
  /* Use model name, the model download progress will be done in preload stage or the generator initialization stage.
5541
5547
  We used `ggml` format model, please refer to https://huggingface.co/BricksDisplay/whisper-ggml
5542
5548
  You can also choose `custom` option and set `Model URL` and `Model MD5` to use your own model */
@@ -5774,7 +5780,13 @@ Default property:
5774
5780
  }
5775
5781
  }
5776
5782
 
5777
- /* Local Speech-to-Text (STT) inference based on GGML and [whisper.cpp](https://github.com/ggerganov/whisper.cpp) */
5783
+ /* Local Speech-to-Text (STT) inference based on GGML and [whisper.cpp](https://github.com/ggerganov/whisper.cpp)
5784
+
5785
+ ## Notice
5786
+ - iOS: Supported GPU acceleration, recommended use M1+ / A17+ chip device
5787
+ - macOS: Supported GPU acceleration, recommended use M1+ chip device
5788
+ - Android: Currently not supported GPU acceleration (Coming soon), recommended use Android 13+ system
5789
+ - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property */
5778
5790
  export type GeneratorSpeechInference = Generator &
5779
5791
  GeneratorSpeechInferenceDef & {
5780
5792
  templateKey: 'GENERATOR_SPEECH_INFERENCE'
@@ -6795,7 +6807,7 @@ Default property:
6795
6807
  - iOS: Supported GPU acceleration, recommended use M1+ / A17+ chip device
6796
6808
  - macOS: Supported GPU acceleration, recommended use M1+ chip device
6797
6809
  - Android: Currently not supported GPU acceleration (Coming soon), recommended use Android 13+ system
6798
- - Linux / Windows: Supported GPU acceleration, currently only Vulkan backend available */
6810
+ - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property */
6799
6811
  export type GeneratorLLM = Generator &
6800
6812
  GeneratorLLMDef & {
6801
6813
  templateKey: 'GENERATOR_LLM'
package/types/system.ts CHANGED
@@ -609,3 +609,35 @@ export type SystemActionThrowException = ActionWithParams & {
609
609
  export type SystemActionDismissKeyboard = Action & {
610
610
  __actionName: 'DISMISS_KEYBOARD'
611
611
  }
612
+
613
+ /* Trigger application AI filter */
614
+ export type SystemActionTriggerApplicationFilter = ActionWithParams & {
615
+ __actionName: 'TRIGGER_APPLICATION_FILTER'
616
+ params?: Array<
617
+ | {
618
+ input: 'name'
619
+ value?: string | DataLink | EventProperty
620
+ mapping?: string
621
+ }
622
+ | {
623
+ input: 'variables'
624
+ value?: any | EventProperty
625
+ mapping?: string
626
+ }
627
+ | {
628
+ input: 'result'
629
+ value?: string | DataLink | (() => Data) | EventProperty
630
+ mapping?: string
631
+ }
632
+ | {
633
+ input: 'error'
634
+ value?: string | DataLink | (() => Data) | EventProperty
635
+ mapping?: string
636
+ }
637
+ >
638
+ }
639
+
640
+ /* Stop running application AI filter */
641
+ export type SystemActionStopApplicationFilter = Action & {
642
+ __actionName: 'STOP_APPLICATION_FILTER'
643
+ }
package/utils/data.ts CHANGED
@@ -75,6 +75,7 @@ type SystemDataName =
75
75
  | 'env'
76
76
  | 'isViewDebugModeEnabled'
77
77
  | 'language'
78
+ | 'aiFilters'
78
79
 
79
80
  type SystemDataInfo = {
80
81
  name: SystemDataName
@@ -432,6 +433,14 @@ export const systemDataList: Array<SystemDataInfo> = [
432
433
  type: 'string',
433
434
  value: '',
434
435
  },
436
+ {
437
+ name: 'aiFilters',
438
+ id: 'PROPERTY_BANK_DATA_NODE_3ffc1e98-8f65-4cc8-a949-3da8d2092ccb',
439
+ title: 'SYSTEM: AI Filters',
440
+ description: 'AI filters configuration from the application',
441
+ type: 'array',
442
+ value: [],
443
+ },
435
444
  ]
436
445
 
437
446
  export const useSystemData = (name: SystemDataName): Data => {