@fugood/bricks-project 2.21.13 → 2.21.14

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.
@@ -654,6 +654,9 @@ export const templateActionNameMap = {
654
654
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
655
655
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
656
656
  responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
657
+ chatTemplateKwargs: 'GENERATOR_LLM_CHAT_TEMPLATE_KWARGS',
658
+ addGenerationPrompt: 'GENERATOR_LLM_ADD_GENERATION_PROMPT',
659
+ now: 'GENERATOR_LLM_NOW',
657
660
  },
658
661
  GENERATOR_LLM_COMPLETION: {
659
662
  sessionKey: 'GENERATOR_LLM_SESSION_KEY',
@@ -663,11 +666,15 @@ export const templateActionNameMap = {
663
666
  parallelToolCalls: 'GENERATOR_LLM_PARALLEL_TOOL_CALLS',
664
667
  toolChoice: 'GENERATOR_LLM_TOOL_CHOICE',
665
668
  enableThinking: 'GENERATOR_LLM_ENABLE_THINKING',
669
+ useReasoningFormat: 'GENERATOR_LLM_USE_REASONING_FORMAT',
666
670
  prompt: 'GENERATOR_LLM_PROMPT',
667
671
  promptMediaPaths: 'GENERATOR_LLM_PROMPT_MEDIA_PATHS',
668
672
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
669
673
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
670
674
  responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
675
+ chatTemplateKwargs: 'GENERATOR_LLM_CHAT_TEMPLATE_KWARGS',
676
+ addGenerationPrompt: 'GENERATOR_LLM_ADD_GENERATION_PROMPT',
677
+ now: 'GENERATOR_LLM_NOW',
671
678
  grammar: 'GENERATOR_LLM_GRAMMAR',
672
679
  stopWords: 'GENERATOR_LLM_STOP_WORDS',
673
680
  predict: 'GENERATOR_LLM_PREDICT',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.13",
3
+ "version": "2.21.14",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -4389,6 +4389,7 @@ Default property:
4389
4389
  | DataLink
4390
4390
  /* Tools
4391
4391
  Type:
4392
+ `static`: Return static data
4392
4393
  `detect-data-change`: Watch data target change to return data,
4393
4394
  please update data with ({ id: string, content: string | object }),
4394
4395
  and ensure the id is same with request id.
@@ -6278,6 +6279,21 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6278
6279
  value?: {} | DataLink | EventProperty
6279
6280
  mapping?: string
6280
6281
  }
6282
+ | {
6283
+ input: 'chatTemplateKwargs'
6284
+ value?: {} | DataLink | EventProperty
6285
+ mapping?: string
6286
+ }
6287
+ | {
6288
+ input: 'addGenerationPrompt'
6289
+ value?: boolean | DataLink | EventProperty
6290
+ mapping?: string
6291
+ }
6292
+ | {
6293
+ input: 'now'
6294
+ value?: string | DataLink | EventProperty
6295
+ mapping?: string
6296
+ }
6281
6297
  >
6282
6298
  }
6283
6299
 
@@ -6320,6 +6336,11 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6320
6336
  value?: boolean | DataLink | EventProperty
6321
6337
  mapping?: string
6322
6338
  }
6339
+ | {
6340
+ input: 'useReasoningFormat'
6341
+ value?: string | DataLink | EventProperty
6342
+ mapping?: string
6343
+ }
6323
6344
  | {
6324
6345
  input: 'prompt'
6325
6346
  value?: string | DataLink | EventProperty
@@ -6345,6 +6366,21 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6345
6366
  value?: {} | DataLink | EventProperty
6346
6367
  mapping?: string
6347
6368
  }
6369
+ | {
6370
+ input: 'chatTemplateKwargs'
6371
+ value?: {} | DataLink | EventProperty
6372
+ mapping?: string
6373
+ }
6374
+ | {
6375
+ input: 'addGenerationPrompt'
6376
+ value?: boolean | DataLink | EventProperty
6377
+ mapping?: string
6378
+ }
6379
+ | {
6380
+ input: 'now'
6381
+ value?: string | DataLink | EventProperty
6382
+ mapping?: string
6383
+ }
6348
6384
  | {
6349
6385
  input: 'grammar'
6350
6386
  value?: string | DataLink | EventProperty
@@ -6536,6 +6572,7 @@ Default property:
6536
6572
  "cacheKType": "f16",
6537
6573
  "cacheVType": "f16",
6538
6574
  "ctxShift": true,
6575
+ "cpuMoeLayers": 0,
6539
6576
  "transformScriptEnabled": false,
6540
6577
  "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables }, members = { llmUtils } \*\/\nreturn inputs.prompt",
6541
6578
  "transformScriptVariables": {},
@@ -6544,22 +6581,14 @@ Default property:
6544
6581
  "completionMode": "auto",
6545
6582
  "completionPrompt": "",
6546
6583
  "completionPromptTemplateType": "${}",
6547
- "completionStopWords": [
6548
- "</s>",
6549
- "<|end|>",
6550
- "<|eot_id|>",
6551
- "<|end_of_text|>",
6552
- "<|im_end|>",
6553
- "<|EOT|>",
6554
- "<|END_OF_TURN_TOKEN|>",
6555
- "<|end_of_turn|>",
6556
- "<|endoftext|>",
6557
- "<eos>",
6558
- "<end_of_turn>"
6559
- ],
6584
+ "completionEnableThinking": true,
6585
+ "completionAddGenerationPrompt": true,
6586
+ "completionChatTemplateKwargs": {},
6587
+ "completionUseReasoningFormat": "auto",
6588
+ "completionStopWords": [],
6560
6589
  "completionPredict": 400,
6561
6590
  "completionTopK": 40,
6562
- "completionTopP": 0.5,
6591
+ "completionTopP": 0.95,
6563
6592
  "completionMinP": 0.05,
6564
6593
  "completionDryMultiplier": 0,
6565
6594
  "completionDryBase": 1.75,
@@ -6573,7 +6602,7 @@ Default property:
6573
6602
  "completionMirostat": 0,
6574
6603
  "completionMirostatTau": 5,
6575
6604
  "completionMirostatEta": 0.1,
6576
- "completionPenaltyLastN": 256,
6605
+ "completionPenaltyLastN": 64,
6577
6606
  "completionPenaltyRepeat": 1,
6578
6607
  "completionPenaltyFrequency": 0,
6579
6608
  "completionPenaltyPresent": 0,
@@ -6624,7 +6653,7 @@ Default property:
6624
6653
  /* Use mmap */
6625
6654
  useMmap?: boolean | DataLink
6626
6655
  /* Use Flash Attention for inference (Recommended with GPU enabled) */
6627
- useFlashAttn?: boolean | DataLink
6656
+ useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
6628
6657
  /* KV cache data type for the K (Default: f16) */
6629
6658
  cacheKType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
6630
6659
  /* KV cache data type for the V (Default: f16) */
@@ -6635,6 +6664,8 @@ Default property:
6635
6664
  useSwaFull?: boolean | DataLink
6636
6665
  /* Enable context shift */
6637
6666
  ctxShift?: boolean | DataLink
6667
+ /* Number of layers to keep MoE weights on CPU */
6668
+ cpuMoeLayers?: number | DataLink
6638
6669
  /* Enable Transform Script for processing the prompt */
6639
6670
  transformScriptEnabled?: boolean | DataLink
6640
6671
  /* Code of Transform Script */
@@ -6695,6 +6726,16 @@ Default property:
6695
6726
  }
6696
6727
  /* Enable thinking */
6697
6728
  completionEnableThinking?: boolean | DataLink
6729
+ /* Add generation prompt */
6730
+ completionAddGenerationPrompt?: boolean | DataLink
6731
+ /* Now (for fill current date in chat template if supported) */
6732
+ completionNow?: string | DataLink
6733
+ /* Additional keyword arguments for chat template (object) */
6734
+ completionChatTemplateKwargs?: {} | DataLink
6735
+ /* Use reasoning format for enhanced response structure
6736
+ `auto` - Auto-determine the reasoning format of the model
6737
+ `none` - Disable reasoning format */
6738
+ completionUseReasoningFormat?: 'auto' | 'none' | DataLink
6698
6739
  /* Stop words */
6699
6740
  completionStopWords?: Array<string | DataLink> | DataLink
6700
6741
  /* Number of tokens to predict */
@@ -6785,6 +6826,8 @@ Default property:
6785
6826
  completionLastToken?: () => Data
6786
6827
  /* Completion result */
6787
6828
  completionResult?: () => Data
6829
+ /* Reasoning content from model responses */
6830
+ completionReasoningContent?: () => Data
6788
6831
  /* Full context (Prompt + Completion) */
6789
6832
  completionFullContext?: () => Data
6790
6833
  /* Inference result details */
@@ -6824,6 +6867,7 @@ export type GeneratorLLM = Generator &
6824
6867
  | 'completionLastFormattedPrompt'
6825
6868
  | 'completionLastToken'
6826
6869
  | 'completionResult'
6870
+ | 'completionReasoningContent'
6827
6871
  | 'completionFullContext'
6828
6872
  | 'completionResultDetails'
6829
6873
  value: any
@@ -6886,7 +6930,7 @@ Default property:
6886
6930
  "gpuLayers": 0,
6887
6931
  "useMlock": true,
6888
6932
  "useMmap": true,
6889
- "useFlashAttn": false
6933
+ "useFlashAttn": "off"
6890
6934
  }
6891
6935
  */
6892
6936
  property?: {
@@ -6959,7 +7003,7 @@ Default property:
6959
7003
  /* Use mmap */
6960
7004
  useMmap?: boolean | DataLink
6961
7005
  /* Use Flash Attention for inference (Recommended with GPU enabled) */
6962
- useFlashAttn?: boolean | DataLink
7006
+ useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
6963
7007
  }
6964
7008
  events?: {
6965
7009
  /* Event triggered when state change */
@@ -792,6 +792,12 @@ export const templateEventPropsMap = {
792
792
  GENERATOR_REALTIME_TRANSCRIPTION: {
793
793
  onTranscribe: [
794
794
  'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_EVENT', // type: object
795
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_TYPE', // type: string
796
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_SLICE_INDEX', // type: number
797
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_RESULT_TEXT', // type: string
798
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_IS_CAPTURING', // type: bool
799
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT', // type: object
800
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_TYPE', // type: string
795
801
  ],
796
802
  onVad: [
797
803
  'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT', // type: object
@@ -827,12 +833,14 @@ export const templateEventPropsMap = {
827
833
  onCompletion: [
828
834
  'GENERATOR_LLM_COMPLETION_SESSION_KEY', // type: string
829
835
  'GENERATOR_LLM_COMPLETION_RESULT', // type: string
836
+ 'GENERATOR_LLM_COMPLETION_REASONING_CONTENT', // type: string
830
837
  'GENERATOR_LLM_COMPLETION_FULL_CONTEXT', // type: string
831
838
  'GENERATOR_LLM_COMPLETION_RESULT_DETAILS', // type: object
832
839
  ],
833
840
  onCompletionFinished: [
834
841
  'GENERATOR_LLM_COMPLETION_SESSION_KEY', // type: string
835
842
  'GENERATOR_LLM_COMPLETION_RESULT', // type: string
843
+ 'GENERATOR_LLM_COMPLETION_REASONING_CONTENT', // type: string
836
844
  'GENERATOR_LLM_COMPLETION_TOOL_CALLS', // type: array
837
845
  'GENERATOR_LLM_COMPLETION_FULL_CONTEXT', // type: string
838
846
  'GENERATOR_LLM_COMPLETION_IS_CONTEXT_FULL', // type: bool