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

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.
@@ -529,17 +529,25 @@ export const templateActionNameMap = {
529
529
  sessionKey: 'GENERATOR_LLM_SESSION_KEY',
530
530
  mode: 'GENERATOR_LLM_MODE',
531
531
  messages: 'GENERATOR_LLM_MESSAGES',
532
+ tools: 'GENERATOR_LLM_TOOLS',
533
+ parallelToolCalls: 'GENERATOR_LLM_PARALLEL_TOOL_CALLS',
534
+ toolChoice: 'GENERATOR_LLM_TOOL_CHOICE',
532
535
  prompt: 'GENERATOR_LLM_PROMPT',
533
536
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
534
537
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
538
+ responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
535
539
  },
536
540
  GENERATOR_LLM_COMPLETION: {
537
541
  sessionKey: 'GENERATOR_LLM_SESSION_KEY',
538
542
  mode: 'GENERATOR_LLM_MODE',
539
543
  messages: 'GENERATOR_LLM_MESSAGES',
544
+ tools: 'GENERATOR_LLM_TOOLS',
545
+ parallelToolCalls: 'GENERATOR_LLM_PARALLEL_TOOL_CALLS',
546
+ toolChoice: 'GENERATOR_LLM_TOOL_CHOICE',
540
547
  prompt: 'GENERATOR_LLM_PROMPT',
541
548
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
542
549
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
550
+ responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
543
551
  grammar: 'GENERATOR_LLM_GRAMMAR',
544
552
  stopWords: 'GENERATOR_LLM_STOP_WORDS',
545
553
  predict: 'GENERATOR_LLM_PREDICT',
@@ -582,8 +590,10 @@ export const templateActionNameMap = {
582
590
  frequencyPenalty: 'GENERATOR_OPENAI_LLM_FREQUENCY_PENALTY',
583
591
  presencePenalty: 'GENERATOR_OPENAI_LLM_PRESENCE_PENALTY',
584
592
  stop: 'GENERATOR_OPENAI_LLM_STOP',
585
- functionCallEnabled: 'GENERATOR_OPENAI_LLM_FUNCTION_CALL_ENABLED',
586
- functionCallSchema: 'GENERATOR_OPENAI_LLM_FUNCTION_CALL_SCHEMA',
593
+ tools: 'GENERATOR_OPENAI_LLM_TOOLS',
594
+ toolChoice: 'GENERATOR_OPENAI_LLM_TOOL_CHOICE',
595
+ parallelToolCalls: 'GENERATOR_OPENAI_LLM_PARALLEL_TOOL_CALLS',
596
+ responseFormat: 'GENERATOR_OPENAI_LLM_RESPONSE_FORMAT',
587
597
  },
588
598
  },
589
599
  GENERATOR_ASSISTANT: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.33",
3
+ "version": "2.21.0-beta.35",
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": "822e1acd83733abd809268bd2719f689e6cb8138"
16
+ "gitHead": "d9e158d3bd0c035e376c2e20e8b07e2da459f4cf"
17
17
  }
@@ -839,6 +839,10 @@ Default property:
839
839
  | DataLink
840
840
  /* Select download source with image version (use width, e.g. [250, 360]) */
841
841
  sourceVersionAlternatives?: Array<number | DataLink> | DataLink
842
+ /* Allowlist patterns to filter media files (supports regex or plain text) */
843
+ allowlist?: Array<string | DataLink> | DataLink
844
+ /* Blocklist patterns to filter media files (supports regex or plain text) */
845
+ blocklist?: Array<string | DataLink> | DataLink
842
846
  }
843
847
  events?: {
844
848
  /* Event of media box fetch error */
@@ -894,10 +898,10 @@ Default property:
894
898
  downloadErrors?: () => Data
895
899
  /* Media box info */
896
900
  box?: () => Data
897
- /* File sync result [ { "url": "/storage/emulated/0/Download/SyncFolder/Asset/1.png", "mediaType": "photo" // enum("photo", "video"), used to distingiush "id": "", } ] */
898
- downloadFileUrls?: () => Data
899
901
  /* 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 } ] */
900
902
  result?: () => Data
903
+ /* File sync result [ { "url": "/storage/emulated/0/Download/SyncFolder/Asset/1.png", "mediaType": "photo" // enum("photo", "video"), used to distingiush "id": "", } ] */
904
+ downloadFileUrls?: () => Data
901
905
  }
902
906
  }
903
907
 
@@ -920,8 +924,8 @@ export type GeneratorMediaFlow = Generator &
920
924
  | 'downloadProgress'
921
925
  | 'downloadErrors'
922
926
  | 'box'
923
- | 'downloadFileUrls'
924
927
  | 'result'
928
+ | 'downloadFileUrls'
925
929
  value: any
926
930
  }
927
931
  }>
@@ -6088,6 +6092,21 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6088
6092
  value?: Array<any> | DataLink
6089
6093
  mapping?: string
6090
6094
  }
6095
+ | {
6096
+ input: 'tools'
6097
+ value?: Array<any> | DataLink
6098
+ mapping?: string
6099
+ }
6100
+ | {
6101
+ input: 'parallelToolCalls'
6102
+ value?: boolean | DataLink
6103
+ mapping?: string
6104
+ }
6105
+ | {
6106
+ input: 'toolChoice'
6107
+ value?: string | DataLink
6108
+ mapping?: string
6109
+ }
6091
6110
  | {
6092
6111
  input: 'prompt'
6093
6112
  value?: string | DataLink
@@ -6103,6 +6122,11 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6103
6122
  value?: string | DataLink
6104
6123
  mapping?: string
6105
6124
  }
6125
+ | {
6126
+ input: 'responseFormat'
6127
+ value?: {} | DataLink
6128
+ mapping?: string
6129
+ }
6106
6130
  >
6107
6131
  }
6108
6132
 
@@ -6125,6 +6149,21 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6125
6149
  value?: Array<any> | DataLink
6126
6150
  mapping?: string
6127
6151
  }
6152
+ | {
6153
+ input: 'tools'
6154
+ value?: Array<any> | DataLink
6155
+ mapping?: string
6156
+ }
6157
+ | {
6158
+ input: 'parallelToolCalls'
6159
+ value?: boolean | DataLink
6160
+ mapping?: string
6161
+ }
6162
+ | {
6163
+ input: 'toolChoice'
6164
+ value?: string | DataLink
6165
+ mapping?: string
6166
+ }
6128
6167
  | {
6129
6168
  input: 'prompt'
6130
6169
  value?: string | DataLink
@@ -6140,6 +6179,11 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6140
6179
  value?: string | DataLink
6141
6180
  mapping?: string
6142
6181
  }
6182
+ | {
6183
+ input: 'responseFormat'
6184
+ value?: {} | DataLink
6185
+ mapping?: string
6186
+ }
6143
6187
  | {
6144
6188
  input: 'grammar'
6145
6189
  value?: string | DataLink
@@ -6381,6 +6425,8 @@ Default property:
6381
6425
  modelHashType?: 'md5' | 'sha256' | 'sha1' | DataLink
6382
6426
  /* Hash of model */
6383
6427
  modelHash?: string | DataLink
6428
+ /* Chat Template (Jinja format) to override the default template from model */
6429
+ chatTemplate?: string | DataLink
6384
6430
  /* Context size (0 ~ 4096) (Default to 512) */
6385
6431
  contextSize?: number | DataLink
6386
6432
  /* Logical batch size for prompt processing */
@@ -6414,10 +6460,6 @@ Default property:
6414
6460
  transformScriptCode?: string | DataLink
6415
6461
  /* Variables used in Transform Script (object) */
6416
6462
  transformScriptVariables?: {} | DataLink
6417
- /* Enable function calling. This will disable the grammar setting */
6418
- functionCallEnabled?: boolean | DataLink
6419
- /* The function calling schema (similar to https://platform.openai.com/docs/guides/gpt/function-calling) */
6420
- functionCallSchema?: Array<DataLink | {}> | DataLink
6421
6463
  /* Session save mode
6422
6464
  `none` - No session saving
6423
6465
  `prompt` - Save session when prompt processed
@@ -6430,6 +6472,12 @@ Default property:
6430
6472
  sessionRemain?: number | DataLink
6431
6473
  /* TODO:loran_gqarms_norm_epsrope_freq_baserope_freq_scale */
6432
6474
  completionMode?: 'auto' | 'chat' | 'text' | DataLink
6475
+ /* Tools for chat mode */
6476
+ completionTools?: {} | DataLink
6477
+ /* Enable parallel tool calls */
6478
+ completionParallelToolCalls?: boolean | DataLink
6479
+ /* Tool choice for chat mode */
6480
+ completionToolChoice?: 'none' | 'auto' | 'required' | DataLink
6433
6481
  /* Messages (chat mode) */
6434
6482
  completionMessages?:
6435
6483
  | Array<
@@ -6446,6 +6494,19 @@ Default property:
6446
6494
  completionPromptTemplateData?: {} | DataLink
6447
6495
  /* The prompt template type */
6448
6496
  completionPromptTemplateType?: '${}' | '{{}}' | DataLink
6497
+ /* Response format */
6498
+ completionResponseFormat?:
6499
+ | DataLink
6500
+ | {
6501
+ type?: 'text' | 'json_schema' | 'json_object' | DataLink
6502
+ json_schema?:
6503
+ | DataLink
6504
+ | {
6505
+ strict?: boolean | DataLink
6506
+ schema?: {} | DataLink
6507
+ }
6508
+ schema?: {} | DataLink
6509
+ }
6449
6510
  /* Stop words */
6450
6511
  completionStopWords?: Array<string | DataLink> | DataLink
6451
6512
  /* Number of tokens to predict */
@@ -6544,7 +6605,7 @@ Default property:
6544
6605
  type: 'string'
6545
6606
  path: string
6546
6607
  }
6547
- completionDetails: {
6608
+ completionResultDetails: {
6548
6609
  type: 'object'
6549
6610
  path: string
6550
6611
  }
@@ -6563,11 +6624,15 @@ Default property:
6563
6624
  type: 'string'
6564
6625
  path: string
6565
6626
  }
6627
+ completionToolCalls: {
6628
+ type: 'array'
6629
+ path: string
6630
+ }
6566
6631
  completionFullContext: {
6567
6632
  type: 'string'
6568
6633
  path: string
6569
6634
  }
6570
- completionDetails: {
6635
+ completionResultDetails: {
6571
6636
  type: 'object'
6572
6637
  path: string
6573
6638
  }
@@ -6619,8 +6684,6 @@ Default property:
6619
6684
  completionFullContext?: () => Data
6620
6685
  /* Inference result details */
6621
6686
  completionResultDetails?: () => Data
6622
- /* Last function call details */
6623
- completionLastFunctionCall?: () => Data
6624
6687
  }
6625
6688
  }
6626
6689
 
@@ -6656,7 +6719,6 @@ export type GeneratorLLM = Generator &
6656
6719
  | 'completionResult'
6657
6720
  | 'completionFullContext'
6658
6721
  | 'completionResultDetails'
6659
- | 'completionLastFunctionCall'
6660
6722
  value: any
6661
6723
  }
6662
6724
  }>
@@ -6704,13 +6766,23 @@ export type GeneratorOpenAILLMActionCompletion = ActionWithParams & {
6704
6766
  mapping?: string
6705
6767
  }
6706
6768
  | {
6707
- input: 'functionCallEnabled'
6769
+ input: 'tools'
6770
+ value?: {} | DataLink
6771
+ mapping?: string
6772
+ }
6773
+ | {
6774
+ input: 'toolChoice'
6775
+ value?: string | DataLink
6776
+ mapping?: string
6777
+ }
6778
+ | {
6779
+ input: 'parallelToolCalls'
6708
6780
  value?: boolean | DataLink
6709
6781
  mapping?: string
6710
6782
  }
6711
6783
  | {
6712
- input: 'functionCallSchema'
6713
- value?: Array<any> | DataLink
6784
+ input: 'responseFormat'
6785
+ value?: {} | DataLink
6714
6786
  mapping?: string
6715
6787
  }
6716
6788
  >
@@ -6764,6 +6836,24 @@ Default property:
6764
6836
  }
6765
6837
  >
6766
6838
  | DataLink
6839
+ /* Tools for chat mode */
6840
+ completionTools?: {} | DataLink
6841
+ /* Enable parallel tool calls */
6842
+ completionParallelToolCalls?: boolean | DataLink
6843
+ /* Tool choice for chat mode */
6844
+ completionToolChoice?: 'none' | 'auto' | 'required' | DataLink
6845
+ /* Response format */
6846
+ completionResponseFormat?:
6847
+ | DataLink
6848
+ | {
6849
+ type?: 'text' | 'json_schema' | 'json_object' | DataLink
6850
+ json_schema?:
6851
+ | DataLink
6852
+ | {
6853
+ strict?: boolean | DataLink
6854
+ schema?: {} | DataLink
6855
+ }
6856
+ }
6767
6857
  /* Maximum tokens to generate */
6768
6858
  completionMaxTokens?: number | DataLink
6769
6859
  /* Temperature */
@@ -6776,10 +6866,6 @@ Default property:
6776
6866
  completionPresencePenalty?: number | DataLink
6777
6867
  /* Stop sequences */
6778
6868
  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
6869
  }
6784
6870
  events?: {
6785
6871
  /* Error event */
@@ -6801,6 +6887,10 @@ Default property:
6801
6887
  type: 'string'
6802
6888
  path: string
6803
6889
  }
6890
+ completionDetails: {
6891
+ type: 'object'
6892
+ path: string
6893
+ }
6804
6894
  }
6805
6895
  }
6806
6896
  >
@@ -6812,6 +6902,10 @@ Default property:
6812
6902
  type: 'string'
6813
6903
  path: string
6814
6904
  }
6905
+ toolCalls: {
6906
+ type: 'array'
6907
+ path: string
6908
+ }
6815
6909
  }
6816
6910
  }
6817
6911
  >