@fugood/bricks-project 2.21.0-beta.31 → 2.21.0-beta.33

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.
@@ -466,6 +466,18 @@ export const templateActionNameMap = {
466
466
  rawCommands: 'GENERATOR_THERMAL_PRINTER_RAW_COMMANDS',
467
467
  },
468
468
  },
469
+ GENERATOR_SQLITE: {
470
+ GENERATOR_SQLITE_EXECUTE: {
471
+ sql: 'GENERATOR_SQLITE_SQL',
472
+ params: 'GENERATOR_SQLITE_PARAMS',
473
+ paramsString: 'GENERATOR_SQLITE_PARAMS_STRING',
474
+ },
475
+ GENERATOR_SQLITE_QUERY: {
476
+ sql: 'GENERATOR_SQLITE_SQL',
477
+ params: 'GENERATOR_SQLITE_PARAMS',
478
+ paramsString: 'GENERATOR_SQLITE_PARAMS_STRING',
479
+ },
480
+ },
469
481
  GENERATOR_TTS: {
470
482
  GENERATOR_TTS_GENERATE: {
471
483
  text: 'GENERATOR_TTS_TEXT',
@@ -561,11 +573,31 @@ export const templateActionNameMap = {
561
573
  sessionCustomKey: 'GENERATOR_LLM_SESSION_CUSTOM_KEY',
562
574
  },
563
575
  },
576
+ GENERATOR_OPENAI_LLM: {
577
+ GENERATOR_OPENAI_LLM_COMPLETION: {
578
+ messages: 'GENERATOR_OPENAI_LLM_MESSAGES',
579
+ maxTokens: 'GENERATOR_OPENAI_LLM_MAX_TOKENS',
580
+ temperature: 'GENERATOR_OPENAI_LLM_TEMPERATURE',
581
+ topP: 'GENERATOR_OPENAI_LLM_TOP_P',
582
+ frequencyPenalty: 'GENERATOR_OPENAI_LLM_FREQUENCY_PENALTY',
583
+ presencePenalty: 'GENERATOR_OPENAI_LLM_PRESENCE_PENALTY',
584
+ stop: 'GENERATOR_OPENAI_LLM_STOP',
585
+ functionCallEnabled: 'GENERATOR_OPENAI_LLM_FUNCTION_CALL_ENABLED',
586
+ functionCallSchema: 'GENERATOR_OPENAI_LLM_FUNCTION_CALL_SCHEMA',
587
+ },
588
+ },
564
589
  GENERATOR_ASSISTANT: {
565
590
  GENERATOR_ASSISTANT_ADD_MESSAGE: {
566
591
  role: 'GENERATOR_ASSISTANT_ROLE',
567
592
  content: 'GENERATOR_ASSISTANT_CONTENT',
568
593
  payload: 'GENERATOR_ASSISTANT_PAYLOAD',
594
+ useFileSearch: 'GENERATOR_ASSISTANT_USE_FILE_SEARCH',
595
+ filePath: 'GENERATOR_ASSISTANT_FILE_PATH',
596
+ fileName: 'GENERATOR_ASSISTANT_FILE_NAME',
597
+ fileExtension: 'GENERATOR_ASSISTANT_FILE_EXTENSION',
598
+ filePayload: 'GENERATOR_ASSISTANT_FILE_PAYLOAD',
599
+ fileSearchCitationCount: 'GENERATOR_ASSISTANT_FILE_SEARCH_CITATION_COUNT',
600
+ fileSearchInsertMethod: 'GENERATOR_ASSISTANT_FILE_SEARCH_INSERT_METHOD',
569
601
  },
570
602
  GENERATOR_ASSISTANT_UPDATE_MESSAGE_AT_INDEX: {
571
603
  index: 'GENERATOR_ASSISTANT_INDEX',
@@ -576,7 +608,23 @@ export const templateActionNameMap = {
576
608
  role: 'GENERATOR_ASSISTANT_ROLE',
577
609
  contentFile: 'GENERATOR_ASSISTANT_CONTENT_FILE',
578
610
  contentBase64: 'GENERATOR_ASSISTANT_CONTENT_BASE64',
611
+ useFileSearch: 'GENERATOR_ASSISTANT_USE_FILE_SEARCH',
579
612
  payload: 'GENERATOR_ASSISTANT_PAYLOAD',
613
+ filePath: 'GENERATOR_ASSISTANT_FILE_PATH',
614
+ fileName: 'GENERATOR_ASSISTANT_FILE_NAME',
615
+ fileExtension: 'GENERATOR_ASSISTANT_FILE_EXTENSION',
616
+ filePayload: 'GENERATOR_ASSISTANT_FILE_PAYLOAD',
617
+ fileSearchCitationCount: 'GENERATOR_ASSISTANT_FILE_SEARCH_CITATION_COUNT',
618
+ fileSearchInsertMethod: 'GENERATOR_ASSISTANT_FILE_SEARCH_INSERT_METHOD',
619
+ },
620
+ GENERATOR_ASSISTANT_ADD_FILE: {
621
+ filePath: 'GENERATOR_ASSISTANT_FILE_PATH',
622
+ fileName: 'GENERATOR_ASSISTANT_FILE_NAME',
623
+ fileExtension: 'GENERATOR_ASSISTANT_FILE_EXTENSION',
624
+ filePayload: 'GENERATOR_ASSISTANT_FILE_PAYLOAD',
625
+ },
626
+ GENERATOR_ASSISTANT_REMOVE_FILE: {
627
+ fileName: 'GENERATOR_ASSISTANT_FILE_NAME',
580
628
  },
581
629
  GENERATOR_ASSISTANT_UPDATE_AUDIO_MESSAGE_AT_INDEX: {
582
630
  index: 'GENERATOR_ASSISTANT_INDEX',
@@ -588,4 +636,31 @@ export const templateActionNameMap = {
588
636
  index: 'GENERATOR_ASSISTANT_INDEX',
589
637
  },
590
638
  },
639
+ GENERATOR_VECTOR_STORE: {
640
+ GENERATOR_VECTOR_STORE_RESET: {
641
+ resetType: 'GENERATOR_VECTOR_STORE_RESET_TYPE',
642
+ },
643
+ GENERATOR_VECTOR_STORE_INSERT_FILE: {
644
+ filePath: 'GENERATOR_VECTOR_STORE_FILE_PATH',
645
+ fileName: 'GENERATOR_VECTOR_STORE_FILE_NAME',
646
+ fileExtension: 'GENERATOR_VECTOR_STORE_FILE_EXTENSION',
647
+ chunkSize: 'GENERATOR_VECTOR_STORE_CHUNK_SIZE',
648
+ },
649
+ GENERATOR_VECTOR_STORE_INSERT_CONTENT: {
650
+ textContent: 'GENERATOR_VECTOR_STORE_TEXT_CONTENT',
651
+ fileName: 'GENERATOR_VECTOR_STORE_FILE_NAME',
652
+ payload: 'GENERATOR_VECTOR_STORE_PAYLOAD',
653
+ chunkSize: 'GENERATOR_VECTOR_STORE_CHUNK_SIZE',
654
+ },
655
+ GENERATOR_VECTOR_STORE_REMOVE_FILE: {
656
+ fileName: 'GENERATOR_VECTOR_STORE_FILE_NAME',
657
+ },
658
+ GENERATOR_VECTOR_STORE_SEARCH: {
659
+ text: 'GENERATOR_VECTOR_STORE_TEXT',
660
+ filename: 'GENERATOR_VECTOR_STORE_FILENAME',
661
+ limit: 'GENERATOR_VECTOR_STORE_LIMIT',
662
+ threshold: 'GENERATOR_VECTOR_STORE_THRESHOLD',
663
+ ignoreThreshold: 'GENERATOR_VECTOR_STORE_IGNORE_THRESHOLD',
664
+ },
665
+ },
591
666
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.31",
3
+ "version": "2.21.0-beta.33",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -13,5 +13,5 @@
13
13
  "lodash": "^4.17.4",
14
14
  "uuid": "^8.3.1"
15
15
  },
16
- "gitHead": "366ad791d1217e2a5b7dc9ab7ba65196023f2357"
16
+ "gitHead": "822e1acd83733abd809268bd2719f689e6cb8138"
17
17
  }
package/types/bricks.ts CHANGED
@@ -3489,3 +3489,288 @@ export type Brick3DViewer = Brick &
3489
3489
  }
3490
3490
  >
3491
3491
  }
3492
+
3493
+ interface GenerativeMediaDef {
3494
+ /*
3495
+ Default property:
3496
+ {
3497
+ "enableCache": true,
3498
+ "type": "image",
3499
+ "resizeMode": "cover",
3500
+ "provider": "openai",
3501
+ "freepikClassicImageSize": "square_1_1"
3502
+ }
3503
+ */
3504
+ property?: BrickBasicProperty & {
3505
+ /* The text prompt to generate media from */
3506
+ prompt?: string | DataLink
3507
+ /* Enable cache */
3508
+ enableCache?: boolean | DataLink
3509
+ /* The type of media to generate (image or video) */
3510
+ type?: 'image' | 'video' | DataLink
3511
+ /* The Lottie animation to show while generating */
3512
+ loadingAnimation?: string | DataLink
3513
+ /* The Lottie animation to show when an error occurs */
3514
+ errorAnimation?: string | DataLink
3515
+ /* The resize mode for the generated media */
3516
+ resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
3517
+ /* The API key for the generative media service */
3518
+ apiKey?: string | DataLink
3519
+ /* The AI provider to use for generation (openai, freepik, or deepai) */
3520
+ provider?: 'openai' | 'freepik-classic' | 'deepai' | DataLink
3521
+ /* OpenAI image size (256x256, 512x512, 1024x1024, etc) */
3522
+ openaiSize?: '1024x1024' | '1024x1792' | '1792x1024' | DataLink
3523
+ /* OpenAI image style (vivid or natural) */
3524
+ openaiStyle?: 'vivid' | 'natural' | DataLink
3525
+ /* OpenAI image quality (standard or hd) */
3526
+ openaiQuality?: 'standard' | 'hd' | DataLink
3527
+ /* Freepik image size */
3528
+ freepikClassicImageSize?:
3529
+ | 'square_1_1'
3530
+ | 'classic_4_3'
3531
+ | 'traditional_3_4'
3532
+ | 'widescreen_16_9'
3533
+ | 'social_story_9_16'
3534
+ | 'smartphone_horizontal_20_9'
3535
+ | 'smartphone_vertical_9_20'
3536
+ | 'standard_3_2'
3537
+ | 'portrait_2_3'
3538
+ | 'horizontal_2_1'
3539
+ | 'vertical_1_2'
3540
+ | 'social_5_4'
3541
+ | 'social_post_4_5'
3542
+ | DataLink
3543
+ /* Freepik image style */
3544
+ freepikClassicStyle?:
3545
+ | 'photo'
3546
+ | 'digital-art'
3547
+ | '3d'
3548
+ | 'painting'
3549
+ | 'low-poly'
3550
+ | 'pixel-art'
3551
+ | 'anime'
3552
+ | 'cyberpunk'
3553
+ | 'comic'
3554
+ | 'vintage'
3555
+ | 'cartoon'
3556
+ | 'vector'
3557
+ | 'studio-shot'
3558
+ | 'dark'
3559
+ | 'sketch'
3560
+ | 'mockup'
3561
+ | '2000s-pone'
3562
+ | '70s-vibe'
3563
+ | 'watercolor'
3564
+ | 'art-nouveau'
3565
+ | 'origami'
3566
+ | 'surreal'
3567
+ | 'fantasy'
3568
+ | 'traditional-japan'
3569
+ | DataLink
3570
+ /* Freepik color scheme */
3571
+ freepikClassicStyleColor?:
3572
+ | 'b&w'
3573
+ | 'pastel'
3574
+ | 'sepia'
3575
+ | 'dramatic'
3576
+ | 'vibrant'
3577
+ | 'orange&teal'
3578
+ | 'film-filter'
3579
+ | 'split'
3580
+ | 'electric'
3581
+ | 'pastel-pink'
3582
+ | 'gold-glow'
3583
+ | 'autumn'
3584
+ | 'muted-green'
3585
+ | 'deep-teal'
3586
+ | 'duotone'
3587
+ | 'terracotta&teal'
3588
+ | 'red&blue'
3589
+ | 'cold-neon'
3590
+ | 'burgundy&blue'
3591
+ | DataLink
3592
+ /* Freepik lighting style */
3593
+ freepikClassicStyleLighting?:
3594
+ | 'studio'
3595
+ | 'warm'
3596
+ | 'cinematic'
3597
+ | 'volumetric'
3598
+ | 'golden-hour'
3599
+ | 'long-exposure'
3600
+ | 'cold'
3601
+ | 'iridescent'
3602
+ | 'dramatic'
3603
+ | 'hardlight'
3604
+ | 'redscale'
3605
+ | 'indoor-light'
3606
+ | DataLink
3607
+ /* Freepik framing style */
3608
+ freepikClassicStyleFraming?:
3609
+ | 'portrait'
3610
+ | 'macro'
3611
+ | 'panoramic'
3612
+ | 'aerial-view'
3613
+ | 'close-up'
3614
+ | 'cinematic'
3615
+ | 'high-angle'
3616
+ | 'low-angle'
3617
+ | 'symmetry'
3618
+ | 'fish-eye'
3619
+ | 'first-person'
3620
+ | DataLink
3621
+ /* Freepik guidance scale (level of fidelity to prompt) */
3622
+ freepikClassicGuidanceScale?: number | DataLink
3623
+ /* Freepik negative prompt (attributes to avoid) */
3624
+ freepikClassicNegativePrompt?: string | DataLink
3625
+ /* DeepAI negative prompt (attributes to avoid) */
3626
+ deepaiNegativePrompt?: string | DataLink
3627
+ /* DeepAI image generator version */
3628
+ deepaiImageGeneratorVersion?: 'standard' | 'hd' | DataLink
3629
+ /* DeepAI output image width */
3630
+ deepaiWidth?: number | DataLink
3631
+ /* DeepAI output image height */
3632
+ deepaiHeight?: number | DataLink
3633
+ }
3634
+ events?: BrickBasicEvents & {
3635
+ /* Event of the brick press */
3636
+ generativeMediaOnPress?: Array<EventAction>
3637
+ /* Event of the brick press in */
3638
+ generativeMediaOnPressIn?: Array<EventAction>
3639
+ /* Event of the brick press out */
3640
+ generativeMediaOnPressOut?: Array<EventAction>
3641
+ /* Event of the brick focus (Use TV Device with controller) */
3642
+ generativeMediaOnFocus?: Array<EventAction>
3643
+ /* Event of the brick blur (Use TV Device with controller) */
3644
+ generativeMediaOnBlur?: Array<EventAction>
3645
+ /* Event when media generation succeeds */
3646
+ onSuccess?: Array<
3647
+ EventAction & {
3648
+ eventPropertyMapping?: {
3649
+ url: {
3650
+ type: 'string'
3651
+ path: string
3652
+ }
3653
+ }
3654
+ }
3655
+ >
3656
+ /* Event when media generation fails */
3657
+ onError?: Array<
3658
+ EventAction & {
3659
+ eventPropertyMapping?: {
3660
+ error: {
3661
+ type: 'string'
3662
+ path: string
3663
+ }
3664
+ }
3665
+ }
3666
+ >
3667
+ /* Event when media prompt request starts */
3668
+ promptStart?: Array<
3669
+ EventAction & {
3670
+ eventPropertyMapping?: {
3671
+ prompt: {
3672
+ type: 'string'
3673
+ path: string
3674
+ }
3675
+ }
3676
+ }
3677
+ >
3678
+ /* Event when media prompt request succeeds */
3679
+ promptSuccess?: Array<
3680
+ EventAction & {
3681
+ eventPropertyMapping?: {
3682
+ url: {
3683
+ type: 'string'
3684
+ path: string
3685
+ }
3686
+ }
3687
+ }
3688
+ >
3689
+ /* Event when media prompt request fails */
3690
+ promptError?: Array<
3691
+ EventAction & {
3692
+ eventPropertyMapping?: {
3693
+ error: {
3694
+ type: 'string'
3695
+ path: string
3696
+ }
3697
+ }
3698
+ }
3699
+ >
3700
+ /* Event when media loading starts */
3701
+ loadStart?: Array<
3702
+ EventAction & {
3703
+ eventPropertyMapping?: {}
3704
+ }
3705
+ >
3706
+ /* Event when media loading succeeds */
3707
+ loadSuccess?: Array<
3708
+ EventAction & {
3709
+ eventPropertyMapping?: {
3710
+ url: {
3711
+ type: 'string'
3712
+ path: string
3713
+ }
3714
+ }
3715
+ }
3716
+ >
3717
+ /* Event when media loading fails */
3718
+ loadError?: Array<
3719
+ EventAction & {
3720
+ eventPropertyMapping?: {
3721
+ error: {
3722
+ type: 'string'
3723
+ path: string
3724
+ }
3725
+ }
3726
+ }
3727
+ >
3728
+ }
3729
+ outlets?: {
3730
+ /* Brick is pressing */
3731
+ brickPressing?: () => Data
3732
+ /* Brick is focusing (Use TV Device with controller) */
3733
+ brickFocusing?: () => Data
3734
+ /* Generated media URL */
3735
+ url?: () => Data
3736
+ /* Generated media error */
3737
+ error?: () => Data
3738
+ }
3739
+ animation?: AnimationBasicEvents & {
3740
+ generativeMediaOnPress?: Animation
3741
+ generativeMediaOnPressIn?: Animation
3742
+ generativeMediaOnPressOut?: Animation
3743
+ generativeMediaOnFocus?: Animation
3744
+ generativeMediaOnBlur?: Animation
3745
+ onSuccess?: Animation
3746
+ onError?: Animation
3747
+ promptStart?: Animation
3748
+ promptSuccess?: Animation
3749
+ promptError?: Animation
3750
+ loadStart?: Animation
3751
+ loadSuccess?: Animation
3752
+ loadError?: Animation
3753
+ }
3754
+ }
3755
+
3756
+ /* Generative Media brick - Generate images and videos using AI */
3757
+ export type GenerativeMedia = Brick &
3758
+ GenerativeMediaDef & {
3759
+ templateKey: 'BRICK_GENERATIVE_MEDIA'
3760
+ switches: Array<
3761
+ SwitchDef &
3762
+ GenerativeMediaDef & {
3763
+ conds?: Array<{
3764
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
3765
+ cond:
3766
+ | SwitchCondInnerStateCurrentCanvas
3767
+ | SwitchCondData
3768
+ | {
3769
+ __typename: 'SwitchCondInnerStateOutlet'
3770
+ outlet: 'brickPressing' | 'brickFocusing' | 'url' | 'error'
3771
+ value: any
3772
+ }
3773
+ }>
3774
+ }
3775
+ >
3776
+ }
@@ -892,6 +892,8 @@ Default property:
892
892
  downloadProgress?: () => Data
893
893
  /* File sync download errors */
894
894
  downloadErrors?: () => Data
895
+ /* Media box info */
896
+ box?: () => Data
895
897
  /* File sync result [ { "url": "/storage/emulated/0/Download/SyncFolder/Asset/1.png", "mediaType": "photo" // enum("photo", "video"), used to distingiush "id": "", } ] */
896
898
  downloadFileUrls?: () => Data
897
899
  /* Save Media Flow fetch result [ { "url": "https://d1kk0369g9vrck.cloudfront.net/box/5b431e29efd40c01e8b2019c/photo5b431e37efd40c01e8b201d1" "extension": "", // enum("jpg", "png", "mp4") "id": "5b431e37efd40c01e8b201d1", "md5": "6134ab412351651324" // md5 came from media resource api } ] */
@@ -917,6 +919,7 @@ export type GeneratorMediaFlow = Generator &
917
919
  | 'downloadStatus'
918
920
  | 'downloadProgress'
919
921
  | 'downloadErrors'
922
+ | 'box'
920
923
  | 'downloadFileUrls'
921
924
  | 'result'
922
925
  value: any
@@ -1497,9 +1500,7 @@ Please note that the key code is not supported on iOS / tvOS, so it will use `ke
1497
1500
  }
1498
1501
  }
1499
1502
 
1500
- /* Listening keyboard (controller) event
1501
-
1502
- NOTE: For iOS, if you're using iOS version less than 13.4, it only supports keyboard up event. */
1503
+ /* Listening keyboard (controller) event */
1503
1504
  export type GeneratorKeyboard = Generator &
1504
1505
  GeneratorKeyboardDef & {
1505
1506
  templateKey: 'GENERATOR_KEYBOARD'
@@ -4544,9 +4545,7 @@ Default property:
4544
4545
  }
4545
4546
  }
4546
4547
 
4547
- /* [UNSTABLE] Tap to Pay on iPhone (iOS only)
4548
-
4549
- \* Currently it is not included in the Production build. */
4548
+ /* [UNSTABLE] Tap to Pay on iPhone (iOS only) */
4550
4549
  export type GeneratorTapPayT2P = Generator &
4551
4550
  GeneratorTapPayT2PDef & {
4552
4551
  templateKey: 'GENERATOR_TAPPAY_T2P_IOS'
@@ -4709,7 +4708,7 @@ Default property:
4709
4708
  /* Connect printer on generator initialized */
4710
4709
  init?: boolean | DataLink
4711
4710
  /* Connection driver */
4712
- driver?: 'escpos' | 'star' | DataLink
4711
+ driver?: 'escpos' | 'star' | 'tsc' | DataLink
4713
4712
  /* The address of the printer */
4714
4713
  connectString?: string | DataLink
4715
4714
  /* The language of the printer (only for EPSON) */
@@ -4738,7 +4737,8 @@ Default property:
4738
4737
  Notes:
4739
4738
  - `reverse-feed` only works on ESC/POS driver
4740
4739
  - `width` and `height` in Star driver is magnification factor
4741
- - `y` position in ESC/POS is use feed lines to offset */
4740
+ - `y` position in ESC/POS is use feed lines to offset
4741
+ - `textFont` only works on TSC driver */
4742
4742
  payload?:
4743
4743
  | Array<
4744
4744
  | DataLink
@@ -4762,6 +4762,7 @@ Default property:
4762
4762
  textEmphasize?: boolean | DataLink
4763
4763
  textUnderline?: boolean | DataLink
4764
4764
  textLang?: 'EN' | 'JA' | 'ZH_CN' | 'ZH_TW' | 'KO' | 'TH' | 'VI' | 'MULTI' | DataLink
4765
+ textFont?: string | DataLink
4765
4766
  barcodeType?:
4766
4767
  | 'CODE39'
4767
4768
  | 'CODE93'
@@ -4778,6 +4779,7 @@ Default property:
4778
4779
  qrcodeModel?: '1' | '2' | DataLink
4779
4780
  qrcodeSize?: number | DataLink
4780
4781
  qrcodeLevel?: 'L' | 'M' | 'Q' | 'H' | DataLink
4782
+ qrcodeMask?: 'S0' | 'S1' | 'S2' | 'S3' | 'S4' | 'S5' | 'S6' | 'S7' | DataLink
4781
4783
  feedLines?: number | DataLink
4782
4784
  lineSpace?: number | DataLink
4783
4785
  }
@@ -4833,6 +4835,132 @@ export type GeneratorThermalPrinter = Generator &
4833
4835
  >
4834
4836
  }
4835
4837
 
4838
+ /* Execute SQL statement */
4839
+ export type GeneratorSqliteActionExecute = ActionWithParams & {
4840
+ __actionName: 'GENERATOR_SQLITE_EXECUTE'
4841
+ params?: Array<
4842
+ | {
4843
+ input: 'sql'
4844
+ value?: string | DataLink
4845
+ mapping?: string
4846
+ }
4847
+ | {
4848
+ input: 'params'
4849
+ value?: Array<any> | DataLink
4850
+ mapping?: string
4851
+ }
4852
+ | {
4853
+ input: 'paramsString'
4854
+ value?: string | DataLink
4855
+ mapping?: string
4856
+ }
4857
+ >
4858
+ }
4859
+
4860
+ /* Query data from database */
4861
+ export type GeneratorSqliteActionQuery = ActionWithParams & {
4862
+ __actionName: 'GENERATOR_SQLITE_QUERY'
4863
+ params?: Array<
4864
+ | {
4865
+ input: 'sql'
4866
+ value?: string | DataLink
4867
+ mapping?: string
4868
+ }
4869
+ | {
4870
+ input: 'params'
4871
+ value?: Array<any> | DataLink
4872
+ mapping?: string
4873
+ }
4874
+ | {
4875
+ input: 'paramsString'
4876
+ value?: string | DataLink
4877
+ mapping?: string
4878
+ }
4879
+ >
4880
+ }
4881
+
4882
+ interface GeneratorSqliteDef {
4883
+ /*
4884
+ Default property:
4885
+ {
4886
+ "init": false,
4887
+ "dbName": "default",
4888
+ "storageType": "file",
4889
+ "useFile": false
4890
+ }
4891
+ */
4892
+ property?: {
4893
+ /* Initialize database on subspace mounted */
4894
+ init?: boolean | DataLink
4895
+ /* Database name */
4896
+ dbName?: string | DataLink
4897
+ /* Storage type */
4898
+ storageType?: 'file' | 'memory' | DataLink
4899
+ /* Use specific file (memory type will be ignored) */
4900
+ useFile?: boolean | DataLink
4901
+ /* File URI for SQLite database */
4902
+ fileUri?: string | DataLink
4903
+ /* MD5 hash of file URI */
4904
+ fileUriMd5?: string | DataLink
4905
+ }
4906
+ events?: {
4907
+ /* Event triggered when error occurs */
4908
+ onError?: Array<
4909
+ EventAction & {
4910
+ eventPropertyMapping?: {
4911
+ error: {
4912
+ type: 'string'
4913
+ path: string
4914
+ }
4915
+ }
4916
+ }
4917
+ >
4918
+ /* Event triggered when query result is ready */
4919
+ onQueryResult?: Array<
4920
+ EventAction & {
4921
+ eventPropertyMapping?: {
4922
+ queryResult: {
4923
+ type: 'array'
4924
+ path: string
4925
+ }
4926
+ }
4927
+ }
4928
+ >
4929
+ }
4930
+ outlets?: {
4931
+ /* Whether the database is ready */
4932
+ isReady?: () => Data
4933
+ /* Database path */
4934
+ dbPath?: () => Data
4935
+ /* Error message */
4936
+ error?: () => Data
4937
+ /* Last query result */
4938
+ lastResult?: () => Data
4939
+ }
4940
+ }
4941
+
4942
+ /* SQLite - General database operations */
4943
+ export type GeneratorSqlite = Generator &
4944
+ GeneratorSqliteDef & {
4945
+ templateKey: 'GENERATOR_SQLITE'
4946
+ switches: Array<
4947
+ SwitchDef &
4948
+ GeneratorSqliteDef & {
4949
+ conds?: Array<{
4950
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
4951
+ cond:
4952
+ | SwitchCondInnerStateCurrentCanvas
4953
+ | SwitchCondData
4954
+ | {
4955
+ __typename: 'SwitchCondInnerStateOutlet'
4956
+ outlet: 'isReady' | 'dbPath' | 'error' | 'lastResult'
4957
+ value: any
4958
+ }
4959
+ }>
4960
+ }
4961
+ >
4962
+ }
4963
+
4836
4964
  /* Load the model */
4837
4965
  export type GeneratorTTSActionLoadModel = Action & {
4838
4966
  __actionName: 'GENERATOR_TTS_LOAD_MODEL'
@@ -4970,6 +5098,8 @@ Default property:
4970
5098
  contextState?: () => Data
4971
5099
  /* Generated audio file */
4972
5100
  generatedAudio?: () => Data
5101
+ /* Generated audio file is playing */
5102
+ generatedAudioPlaying?: () => Data
4973
5103
  }
4974
5104
  }
4975
5105
 
@@ -4988,7 +5118,7 @@ export type GeneratorTTS = Generator &
4988
5118
  | SwitchCondData
4989
5119
  | {
4990
5120
  __typename: 'SwitchCondInnerStateOutlet'
4991
- outlet: 'contextState' | 'generatedAudio'
5121
+ outlet: 'contextState' | 'generatedAudio' | 'generatedAudioPlaying'
4992
5122
  value: any
4993
5123
  }
4994
5124
  }>
@@ -6187,6 +6317,7 @@ Default property:
6187
6317
  "init": false,
6188
6318
  "contextSize": 512,
6189
6319
  "batchSize": 512,
6320
+ "uBatchSize": 512,
6190
6321
  "accelVariant": "default",
6191
6322
  "mainGpu": 0,
6192
6323
  "gpuLayers": 0,
@@ -6252,14 +6383,17 @@ Default property:
6252
6383
  modelHash?: string | DataLink
6253
6384
  /* Context size (0 ~ 4096) (Default to 512) */
6254
6385
  contextSize?: number | DataLink
6255
- /* Batch size */
6386
+ /* Logical batch size for prompt processing */
6256
6387
  batchSize?: number | DataLink
6388
+ /* Physical batch size for prompt processing */
6389
+ uBatchSize?: number | DataLink
6257
6390
  /* Number of threads */
6258
6391
  maxThreads?: number | DataLink
6259
6392
  /* Accelerator variant (Only for desktop)
6260
6393
  `default` - CPU / Metal (macOS)
6261
- `vulkan` - Use Vulkan */
6262
- accelVariant?: 'default' | 'vulkan' | DataLink
6394
+ `vulkan` - Use Vulkan
6395
+ `cuda` - Use CUDA */
6396
+ accelVariant?: 'default' | 'vulkan' | 'cuda' | DataLink
6263
6397
  /* Main GPU index */
6264
6398
  mainGpu?: number | DataLink
6265
6399
  /* Number of GPU layers (NOTE: Currently not supported for Android) */
@@ -6530,6 +6664,211 @@ export type GeneratorLLM = Generator &
6530
6664
  >
6531
6665
  }
6532
6666
 
6667
+ /* Run text completion */
6668
+ export type GeneratorOpenAILLMActionCompletion = ActionWithParams & {
6669
+ __actionName: 'GENERATOR_OPENAI_LLM_COMPLETION'
6670
+ params?: Array<
6671
+ | {
6672
+ input: 'messages'
6673
+ value?: Array<any> | DataLink
6674
+ mapping?: string
6675
+ }
6676
+ | {
6677
+ input: 'maxTokens'
6678
+ value?: number | DataLink
6679
+ mapping?: string
6680
+ }
6681
+ | {
6682
+ input: 'temperature'
6683
+ value?: number | DataLink
6684
+ mapping?: string
6685
+ }
6686
+ | {
6687
+ input: 'topP'
6688
+ value?: number | DataLink
6689
+ mapping?: string
6690
+ }
6691
+ | {
6692
+ input: 'frequencyPenalty'
6693
+ value?: number | DataLink
6694
+ mapping?: string
6695
+ }
6696
+ | {
6697
+ input: 'presencePenalty'
6698
+ value?: number | DataLink
6699
+ mapping?: string
6700
+ }
6701
+ | {
6702
+ input: 'stop'
6703
+ value?: Array<any> | DataLink
6704
+ mapping?: string
6705
+ }
6706
+ | {
6707
+ input: 'functionCallEnabled'
6708
+ value?: boolean | DataLink
6709
+ mapping?: string
6710
+ }
6711
+ | {
6712
+ input: 'functionCallSchema'
6713
+ value?: Array<any> | DataLink
6714
+ mapping?: string
6715
+ }
6716
+ >
6717
+ }
6718
+
6719
+ /* Stop text completion */
6720
+ export type GeneratorOpenAILLMActionStopCompletion = Action & {
6721
+ __actionName: 'GENERATOR_OPENAI_LLM_STOP_COMPLETION'
6722
+ }
6723
+
6724
+ interface GeneratorOpenAILLMDef {
6725
+ /*
6726
+ Default property:
6727
+ {
6728
+ "apiEndpoint": "https://api.openai.com/v1",
6729
+ "model": "gpt-4o-mini",
6730
+ "completionMessages": [
6731
+ null
6732
+ ],
6733
+ "completionMaxTokens": 1024,
6734
+ "completionTemperature": 1,
6735
+ "completionTopP": 1,
6736
+ "completionFrequencyPenalty": 0,
6737
+ "completionPresencePenalty": 0,
6738
+ "completionStop": []
6739
+ }
6740
+ */
6741
+ property?: {
6742
+ /* API endpoint URL */
6743
+ apiEndpoint?: string | DataLink
6744
+ /* API key */
6745
+ apiKey?: string | DataLink
6746
+ /* Model name (Default: gpt-4o-mini) */
6747
+ model?: string | DataLink
6748
+ /* Chat messages */
6749
+ completionMessages?:
6750
+ | Array<
6751
+ | DataLink
6752
+ | {
6753
+ role?: string | DataLink
6754
+ content?:
6755
+ | string
6756
+ | DataLink
6757
+ | DataLink
6758
+ | {
6759
+ type?: string | DataLink
6760
+ text?: string | DataLink
6761
+ image_url?: string | DataLink
6762
+ }
6763
+ | DataLink
6764
+ }
6765
+ >
6766
+ | DataLink
6767
+ /* Maximum tokens to generate */
6768
+ completionMaxTokens?: number | DataLink
6769
+ /* Temperature */
6770
+ completionTemperature?: number | DataLink
6771
+ /* Top P sampling */
6772
+ completionTopP?: number | DataLink
6773
+ /* Frequency penalty */
6774
+ completionFrequencyPenalty?: number | DataLink
6775
+ /* Presence penalty */
6776
+ completionPresencePenalty?: number | DataLink
6777
+ /* Stop sequences */
6778
+ completionStop?: Array<string | DataLink> | DataLink
6779
+ /* Enable function calling. */
6780
+ functionCallEnabled?: boolean | DataLink
6781
+ /* The function calling schema (ref: https://platform.openai.com/docs/guides/gpt/function-calling) */
6782
+ functionCallSchema?: Array<DataLink | {}> | DataLink
6783
+ }
6784
+ events?: {
6785
+ /* Error event */
6786
+ onError?: Array<
6787
+ EventAction & {
6788
+ eventPropertyMapping?: {
6789
+ error: {
6790
+ type: 'string'
6791
+ path: string
6792
+ }
6793
+ }
6794
+ }
6795
+ >
6796
+ /* Completion event */
6797
+ onCompletion?: Array<
6798
+ EventAction & {
6799
+ eventPropertyMapping?: {
6800
+ completionResult: {
6801
+ type: 'string'
6802
+ path: string
6803
+ }
6804
+ }
6805
+ }
6806
+ >
6807
+ /* Completion finished event */
6808
+ onCompletionFinished?: Array<
6809
+ EventAction & {
6810
+ eventPropertyMapping?: {
6811
+ completionResult: {
6812
+ type: 'string'
6813
+ path: string
6814
+ }
6815
+ }
6816
+ }
6817
+ >
6818
+ /* Completion function call event */
6819
+ onCompletionFunctionCall?: Array<
6820
+ EventAction & {
6821
+ eventPropertyMapping?: {
6822
+ completionFunctionCallName: {
6823
+ type: 'string'
6824
+ path: string
6825
+ }
6826
+ completionFunctionArguments: {
6827
+ type: 'string'
6828
+ path: string
6829
+ }
6830
+ }
6831
+ }
6832
+ >
6833
+ }
6834
+ outlets?: {
6835
+ /* Evaluating outlet */
6836
+ isEvaluating?: () => Data
6837
+ /* Completion result outlet */
6838
+ completionResult?: () => Data
6839
+ /* Completion details outlet */
6840
+ completionDetails?: () => Data
6841
+ }
6842
+ }
6843
+
6844
+ /* LLM inference using OpenAI-compatible API endpoints
6845
+
6846
+ ## Features
6847
+ - Compatible with OpenAI API format
6848
+ - Supports function calling
6849
+ - Streaming responses
6850
+ - Custom API endpoints */
6851
+ export type GeneratorOpenAILLM = Generator &
6852
+ GeneratorOpenAILLMDef & {
6853
+ templateKey: 'GENERATOR_OPENAI_LLM'
6854
+ switches: Array<
6855
+ SwitchDef &
6856
+ GeneratorOpenAILLMDef & {
6857
+ conds?: Array<{
6858
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
6859
+ cond:
6860
+ | SwitchCondInnerStateCurrentCanvas
6861
+ | SwitchCondData
6862
+ | {
6863
+ __typename: 'SwitchCondInnerStateOutlet'
6864
+ outlet: 'isEvaluating' | 'completionResult' | 'completionDetails'
6865
+ value: any
6866
+ }
6867
+ }>
6868
+ }
6869
+ >
6870
+ }
6871
+
6533
6872
  /* Add a message to the assistant */
6534
6873
  export type GeneratorAssistantActionAddMessage = ActionWithParams & {
6535
6874
  __actionName: 'GENERATOR_ASSISTANT_ADD_MESSAGE'
@@ -6549,6 +6888,41 @@ export type GeneratorAssistantActionAddMessage = ActionWithParams & {
6549
6888
  value?: {} | DataLink
6550
6889
  mapping?: string
6551
6890
  }
6891
+ | {
6892
+ input: 'useFileSearch'
6893
+ value?: boolean | DataLink
6894
+ mapping?: string
6895
+ }
6896
+ | {
6897
+ input: 'filePath'
6898
+ value?: string | DataLink
6899
+ mapping?: string
6900
+ }
6901
+ | {
6902
+ input: 'fileName'
6903
+ value?: string | DataLink
6904
+ mapping?: string
6905
+ }
6906
+ | {
6907
+ input: 'fileExtension'
6908
+ value?: string | DataLink
6909
+ mapping?: string
6910
+ }
6911
+ | {
6912
+ input: 'filePayload'
6913
+ value?: {} | DataLink
6914
+ mapping?: string
6915
+ }
6916
+ | {
6917
+ input: 'fileSearchCitationCount'
6918
+ value?: number | DataLink
6919
+ mapping?: string
6920
+ }
6921
+ | {
6922
+ input: 'fileSearchInsertMethod'
6923
+ value?: 'in-user-message' | 'new-assistant-message' | DataLink
6924
+ mapping?: string
6925
+ }
6552
6926
  >
6553
6927
  }
6554
6928
 
@@ -6593,14 +6967,86 @@ export type GeneratorAssistantActionAddAudioMessage = ActionWithParams & {
6593
6967
  value?: string | DataLink
6594
6968
  mapping?: string
6595
6969
  }
6970
+ | {
6971
+ input: 'useFileSearch'
6972
+ value?: boolean | DataLink
6973
+ mapping?: string
6974
+ }
6596
6975
  | {
6597
6976
  input: 'payload'
6598
6977
  value?: {} | DataLink
6599
6978
  mapping?: string
6600
6979
  }
6980
+ | {
6981
+ input: 'filePath'
6982
+ value?: string | DataLink
6983
+ mapping?: string
6984
+ }
6985
+ | {
6986
+ input: 'fileName'
6987
+ value?: string | DataLink
6988
+ mapping?: string
6989
+ }
6990
+ | {
6991
+ input: 'fileExtension'
6992
+ value?: string | DataLink
6993
+ mapping?: string
6994
+ }
6995
+ | {
6996
+ input: 'filePayload'
6997
+ value?: {} | DataLink
6998
+ mapping?: string
6999
+ }
7000
+ | {
7001
+ input: 'fileSearchCitationCount'
7002
+ value?: number | DataLink
7003
+ mapping?: string
7004
+ }
7005
+ | {
7006
+ input: 'fileSearchInsertMethod'
7007
+ value?: 'in-user-message' | 'new-assistant-message' | DataLink
7008
+ mapping?: string
7009
+ }
6601
7010
  >
6602
7011
  }
6603
7012
 
7013
+ /* Add a file to File Search (Vector Store) */
7014
+ export type GeneratorAssistantActionAddFile = ActionWithParams & {
7015
+ __actionName: 'GENERATOR_ASSISTANT_ADD_FILE'
7016
+ params?: Array<
7017
+ | {
7018
+ input: 'filePath'
7019
+ value?: string | DataLink
7020
+ mapping?: string
7021
+ }
7022
+ | {
7023
+ input: 'fileName'
7024
+ value?: string | DataLink
7025
+ mapping?: string
7026
+ }
7027
+ | {
7028
+ input: 'fileExtension'
7029
+ value?: string | DataLink
7030
+ mapping?: string
7031
+ }
7032
+ | {
7033
+ input: 'filePayload'
7034
+ value?: {} | DataLink
7035
+ mapping?: string
7036
+ }
7037
+ >
7038
+ }
7039
+
7040
+ /* Remove a file from File Search (Vector Store) */
7041
+ export type GeneratorAssistantActionRemoveFile = ActionWithParams & {
7042
+ __actionName: 'GENERATOR_ASSISTANT_REMOVE_FILE'
7043
+ params?: Array<{
7044
+ input: 'fileName'
7045
+ value?: string | DataLink
7046
+ mapping?: string
7047
+ }>
7048
+ }
7049
+
6604
7050
  /* Update a audio message at a specific index */
6605
7051
  export type GeneratorAssistantActionUpdateAudioMessageAtIndex = ActionWithParams & {
6606
7052
  __actionName: 'GENERATOR_ASSISTANT_UPDATE_AUDIO_MESSAGE_AT_INDEX'
@@ -6643,6 +7089,11 @@ export type GeneratorAssistantActionResetMessages = Action & {
6643
7089
  __actionName: 'GENERATOR_ASSISTANT_RESET_MESSAGES'
6644
7090
  }
6645
7091
 
7092
+ /* Reset assistant (Reset all messages and files) */
7093
+ export type GeneratorAssistantActionReset = Action & {
7094
+ __actionName: 'GENERATOR_ASSISTANT_RESET'
7095
+ }
7096
+
6646
7097
  /* Submit the assistant */
6647
7098
  export type GeneratorAssistantActionSubmit = Action & {
6648
7099
  __actionName: 'GENERATOR_ASSISTANT_SUBMIT'
@@ -6663,6 +7114,8 @@ Default property:
6663
7114
  "cacheMessages": false,
6664
7115
  "llmLivePolicy": "only-in-use",
6665
7116
  "llmSessionKey": "default-assistant",
7117
+ "fileSearchEnabled": false,
7118
+ "fileSearchLivePolicy": "only-in-use",
6666
7119
  "sttEnabled": true,
6667
7120
  "sttLivePolicy": "only-in-use",
6668
7121
  "ttsEnabled": false,
@@ -6690,6 +7143,18 @@ Default property:
6690
7143
  llmLivePolicy?: 'only-in-use' | 'manual' | DataLink
6691
7144
  /* LLM main session key */
6692
7145
  llmSessionKey?: string | DataLink
7146
+ /* File Search (Vector Store) Enabled */
7147
+ fileSearchEnabled?: boolean | DataLink
7148
+ /* File Search (Vector Store) Generator */
7149
+ fileSearchGeneratorId?: string | DataLink
7150
+ /* File Search (Vector Store) Live Policy. If the policy is `only-in-use`, the File Search (Vector Store) context will be released when the assistant is not in use. */
7151
+ fileSearchLivePolicy?: 'only-in-use' | 'manual' | DataLink
7152
+ /* File Search Citation Count. (Default: 3) */
7153
+ fileSearchCitationCount?: number | DataLink
7154
+ /* File Search Threshold. (Default: 1.0) */
7155
+ fileSearchThreshold?: number | DataLink
7156
+ /* File Search Ignore Threshold. (Default: false) */
7157
+ fileSearchIgnoreThreshold?: boolean | DataLink
6693
7158
  /* STT Generator use for transcribing audio message (Currently only support `STT (GGML)` generator) */
6694
7159
  sttGeneratorId?: string | DataLink
6695
7160
  /* STT Enabled */
@@ -6741,8 +7206,14 @@ Default property:
6741
7206
  outlets?: {
6742
7207
  /* Whether the assistant is heating up */
6743
7208
  isHeatingUp?: () => Data
7209
+ /* Whether the assistant is file processing */
7210
+ isFileProcessing?: () => Data
6744
7211
  /* Whether the assistant is responding */
6745
7212
  isResponding?: () => Data
7213
+ /* Whether the assistant is busy */
7214
+ isBusy?: () => Data
7215
+ /* Embedding files of the assistant */
7216
+ files?: () => Data
6746
7217
  /* Messages of the assistant */
6747
7218
  messages?: () => Data
6748
7219
  }
@@ -6762,7 +7233,235 @@ export type GeneratorAssistant = Generator &
6762
7233
  | SwitchCondData
6763
7234
  | {
6764
7235
  __typename: 'SwitchCondInnerStateOutlet'
6765
- outlet: 'isHeatingUp' | 'isResponding' | 'messages'
7236
+ outlet:
7237
+ | 'isHeatingUp'
7238
+ | 'isFileProcessing'
7239
+ | 'isResponding'
7240
+ | 'isBusy'
7241
+ | 'files'
7242
+ | 'messages'
7243
+ value: any
7244
+ }
7245
+ }>
7246
+ }
7247
+ >
7248
+ }
7249
+
7250
+ /* Load the model (Only if source is ggml) */
7251
+ export type GeneratorVectorStoreActionModelLoad = Action & {
7252
+ __actionName: 'GENERATOR_VECTOR_STORE_MODEL_LOAD'
7253
+ }
7254
+
7255
+ /* Release the model (Only if source is ggml) */
7256
+ export type GeneratorVectorStoreActionModelRelease = Action & {
7257
+ __actionName: 'GENERATOR_VECTOR_STORE_MODEL_RELEASE'
7258
+ }
7259
+
7260
+ /* Reset the embedding session */
7261
+ export type GeneratorVectorStoreActionReset = ActionWithParams & {
7262
+ __actionName: 'GENERATOR_VECTOR_STORE_RESET'
7263
+ params?: Array<{
7264
+ input: 'resetType'
7265
+ value?: 'session' | 'all' | DataLink
7266
+ mapping?: string
7267
+ }>
7268
+ }
7269
+
7270
+ /* Insert file content with path or url, support Office / OpenOffice / PDF
7271
+
7272
+ PDF is not currently supprted in iOS / Android */
7273
+ export type GeneratorVectorStoreActionInsertFile = ActionWithParams & {
7274
+ __actionName: 'GENERATOR_VECTOR_STORE_INSERT_FILE'
7275
+ params?: Array<
7276
+ | {
7277
+ input: 'filePath'
7278
+ value?: string | DataLink
7279
+ mapping?: string
7280
+ }
7281
+ | {
7282
+ input: 'fileName'
7283
+ value?: string | DataLink
7284
+ mapping?: string
7285
+ }
7286
+ | {
7287
+ input: 'fileExtension'
7288
+ value?: string | DataLink
7289
+ mapping?: string
7290
+ }
7291
+ | {
7292
+ input: 'chunkSize'
7293
+ value?: number | DataLink
7294
+ mapping?: string
7295
+ }
7296
+ >
7297
+ }
7298
+
7299
+ /* Cancel the file download */
7300
+ export type GeneratorVectorStoreActionCancelFileDownload = Action & {
7301
+ __actionName: 'GENERATOR_VECTOR_STORE_CANCEL_FILE_DOWNLOAD'
7302
+ }
7303
+
7304
+ /* Insert pure text content to vector store */
7305
+ export type GeneratorVectorStoreActionInsertContent = ActionWithParams & {
7306
+ __actionName: 'GENERATOR_VECTOR_STORE_INSERT_CONTENT'
7307
+ params?: Array<
7308
+ | {
7309
+ input: 'textContent'
7310
+ value?: string | DataLink
7311
+ mapping?: string
7312
+ }
7313
+ | {
7314
+ input: 'fileName'
7315
+ value?: string | DataLink
7316
+ mapping?: string
7317
+ }
7318
+ | {
7319
+ input: 'payload'
7320
+ value?: {} | DataLink
7321
+ mapping?: string
7322
+ }
7323
+ | {
7324
+ input: 'chunkSize'
7325
+ value?: number | DataLink
7326
+ mapping?: string
7327
+ }
7328
+ >
7329
+ }
7330
+
7331
+ /* Remove file from vector store */
7332
+ export type GeneratorVectorStoreActionRemoveFile = ActionWithParams & {
7333
+ __actionName: 'GENERATOR_VECTOR_STORE_REMOVE_FILE'
7334
+ params?: Array<{
7335
+ input: 'fileName'
7336
+ value?: string | DataLink
7337
+ mapping?: string
7338
+ }>
7339
+ }
7340
+
7341
+ /* Search similar text chunks in vector store */
7342
+ export type GeneratorVectorStoreActionSearch = ActionWithParams & {
7343
+ __actionName: 'GENERATOR_VECTOR_STORE_SEARCH'
7344
+ params?: Array<
7345
+ | {
7346
+ input: 'text'
7347
+ value?: string | DataLink
7348
+ mapping?: string
7349
+ }
7350
+ | {
7351
+ input: 'filename'
7352
+ value?: string | DataLink
7353
+ mapping?: string
7354
+ }
7355
+ | {
7356
+ input: 'limit'
7357
+ value?: number | DataLink
7358
+ mapping?: string
7359
+ }
7360
+ | {
7361
+ input: 'threshold'
7362
+ value?: number | DataLink
7363
+ mapping?: string
7364
+ }
7365
+ | {
7366
+ input: 'ignoreThreshold'
7367
+ value?: boolean | DataLink
7368
+ mapping?: string
7369
+ }
7370
+ >
7371
+ }
7372
+
7373
+ interface GeneratorVectorStoreDef {
7374
+ /*
7375
+ Default property:
7376
+ {
7377
+ "source": "ggml",
7378
+ "ggmlContextSize": 512,
7379
+ "openaiBaseUrl": "https://api.openai.com/v1",
7380
+ "openaiModel": "text-embedding-3-small",
7381
+ "embedSessionId": "default-embeddings",
7382
+ "fileChunkSize": 256
7383
+ }
7384
+ */
7385
+ property?: {
7386
+ /* Initialize embedding model context & tokenizer context on subspace mounted */
7387
+ init?: boolean | DataLink
7388
+ /* Source of embedding model. Note that you can't use the saved embedddings data in different sources. */
7389
+ source?: 'ggml' | 'openai' | DataLink
7390
+ /* Path of ggml model */
7391
+ ggmlModelUrl?: string | DataLink
7392
+ /* Hash type of ggml model */
7393
+ ggmlModelHashType?: 'sha256' | 'sha1' | 'md5' | DataLink
7394
+ /* Hash of ggml model */
7395
+ ggmlModelHash?: string | DataLink
7396
+ /* Size of ggml context */
7397
+ ggmlContextSize?: number | DataLink
7398
+ /* Pooling type of ggml model */
7399
+ ggmlPoolingType?: 'none' | 'mean' | 'cls' | 'last' | 'rank' | DataLink
7400
+ /* Accelerator variant of ggml model */
7401
+ ggmlAccelVariant?: 'default' | 'vulkan' | 'cuda' | DataLink
7402
+ /* Normalize */
7403
+ ggmlEmbdNormalize?: number | DataLink
7404
+ /* API key of OpenAI Compatible API */
7405
+ openaiApiKey?: string | DataLink
7406
+ /* Base URL of OpenAI Compatible API. For example, we can use ollama / llama.cpp server instead of openai */
7407
+ openaiBaseUrl?: string | DataLink
7408
+ /* Model of OpenAI Compatible API */
7409
+ openaiModel?: 'text-embedding-3-small' | 'text-embedding-3-large' | DataLink
7410
+ /* Session ID of embedding */
7411
+ embedSessionId?: string | DataLink
7412
+ /* Storage type of embedding */
7413
+ embedStorageType?: 'file' | 'memory' | DataLink
7414
+ /* Tokenizer model URL (Recommended to use same with your LLM model, the model will just load with vocab_only mode) */
7415
+ tokenizerModelUrl?: string | DataLink
7416
+ /* Tokenizer model hash */
7417
+ tokenizerModelHash?: string | DataLink
7418
+ /* Tokenizer model hash type */
7419
+ tokenizerModelHashType?: 'sha256' | 'sha1' | 'md5' | DataLink
7420
+ /* Chunk size to handle file content (token), must be less then embedding model context size */
7421
+ fileChunkSize?: number | DataLink
7422
+ }
7423
+ events?: {
7424
+ /* Event triggered when error occurs */
7425
+ onError?: Array<
7426
+ EventAction & {
7427
+ eventPropertyMapping?: {
7428
+ error: {
7429
+ type: 'string'
7430
+ path: string
7431
+ }
7432
+ }
7433
+ }
7434
+ >
7435
+ }
7436
+ outlets?: {
7437
+ /* undefined */
7438
+ isReady?: () => Data
7439
+ /* Whether the embedding is processing */
7440
+ processing?: () => Data
7441
+ /* Progress of embedding processing */
7442
+ processProgress?: () => Data
7443
+ /* Files inserted to embedding */
7444
+ files?: () => Data
7445
+ /* Search result */
7446
+ searchResult?: () => Data
7447
+ }
7448
+ }
7449
+
7450
+ /* Vector Store - File embeddings & search */
7451
+ export type GeneratorVectorStore = Generator &
7452
+ GeneratorVectorStoreDef & {
7453
+ templateKey: 'GENERATOR_VECTOR_STORE'
7454
+ switches: Array<
7455
+ SwitchDef &
7456
+ GeneratorVectorStoreDef & {
7457
+ conds?: Array<{
7458
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
7459
+ cond:
7460
+ | SwitchCondInnerStateCurrentCanvas
7461
+ | SwitchCondData
7462
+ | {
7463
+ __typename: 'SwitchCondInnerStateOutlet'
7464
+ outlet: 'isReady' | 'processing' | 'processProgress' | 'files' | 'searchResult'
6766
7465
  value: any
6767
7466
  }
6768
7467
  }>
package/utils/data.ts CHANGED
@@ -62,6 +62,7 @@ type SystemDataName =
62
62
  | 'isWifiEnabled'
63
63
  | 'deviceDisplayName'
64
64
  | 'workspaceName'
65
+ | 'applicationInfo'
65
66
  | 'applicationName'
66
67
  | 'macAddress'
67
68
  | 'bindDeviceCode'
@@ -326,6 +327,14 @@ export const systemDataList: Array<SystemDataInfo> = [
326
327
  type: 'string',
327
328
  value: '',
328
329
  },
330
+ {
331
+ name: 'applicationInfo',
332
+ id: 'PROPERTY_BANK_DATA_NODE_935d3322-84aa-4465-b1e7-241d1f024267',
333
+ title: 'SYSTEM: Application Info',
334
+ description: 'Current application info',
335
+ type: 'object',
336
+ value: {},
337
+ },
329
338
  {
330
339
  name: 'applicationName',
331
340
  id: 'PROPERTY_BANK_DATA_NODE_df395fd6-a754-4b60-8bac-1360933e6707',