@fugood/bricks-project 2.22.0-beta.25 → 2.22.0-beta.27

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.
@@ -660,6 +660,9 @@ export const templateActionNameMap = {
660
660
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
661
661
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
662
662
  responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
663
+ chatTemplateKwargs: 'GENERATOR_LLM_CHAT_TEMPLATE_KWARGS',
664
+ addGenerationPrompt: 'GENERATOR_LLM_ADD_GENERATION_PROMPT',
665
+ now: 'GENERATOR_LLM_NOW',
663
666
  },
664
667
  GENERATOR_LLM_COMPLETION: {
665
668
  sessionKey: 'GENERATOR_LLM_SESSION_KEY',
@@ -675,6 +678,9 @@ export const templateActionNameMap = {
675
678
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
676
679
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
677
680
  responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
681
+ chatTemplateKwargs: 'GENERATOR_LLM_CHAT_TEMPLATE_KWARGS',
682
+ addGenerationPrompt: 'GENERATOR_LLM_ADD_GENERATION_PROMPT',
683
+ now: 'GENERATOR_LLM_NOW',
678
684
  grammar: 'GENERATOR_LLM_GRAMMAR',
679
685
  stopWords: 'GENERATOR_LLM_STOP_WORDS',
680
686
  predict: 'GENERATOR_LLM_PREDICT',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.22.0-beta.25",
3
+ "version": "2.22.0-beta.27",
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": "258a8b72376abac00d53dc39ca93e58ffcea3445"
17
+ "gitHead": "6a1bca38b9962ca9d6ec45842b4c9a6426369d78"
18
18
  }
@@ -2534,6 +2534,9 @@ Default property:
2534
2534
  idleTimeout?: number | DataLink
2535
2535
  /* HTTP request body limit, 0 is unlimited */
2536
2536
  bodyLimit?: number | DataLink
2537
+ /* CORS allowed origins
2538
+ You can use wildcard like `*`, `*.example.com`, `http://*.example.com` */
2539
+ corsOrigins?: Array<string | DataLink> | DataLink
2537
2540
  /* Authorization type of HTTP request */
2538
2541
  authType?: 'none' | 'basic' | 'bearer' | DataLink
2539
2542
  /* Username of basic auth */
@@ -2567,6 +2570,8 @@ Default property:
2567
2570
  | DataLink
2568
2571
  /* Response Body */
2569
2572
  resBody?: any
2573
+ /* Custom response headers */
2574
+ resHeader?: {} | DataLink
2570
2575
  /* Event name of SSE */
2571
2576
  sseEvent?: string | DataLink
2572
2577
  /* SSE single request mode, block new request until the previous request is processed */
@@ -6294,6 +6299,21 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6294
6299
  value?: {} | DataLink | EventProperty
6295
6300
  mapping?: string
6296
6301
  }
6302
+ | {
6303
+ input: 'chatTemplateKwargs'
6304
+ value?: {} | DataLink | EventProperty
6305
+ mapping?: string
6306
+ }
6307
+ | {
6308
+ input: 'addGenerationPrompt'
6309
+ value?: boolean | DataLink | EventProperty
6310
+ mapping?: string
6311
+ }
6312
+ | {
6313
+ input: 'now'
6314
+ value?: string | DataLink | EventProperty
6315
+ mapping?: string
6316
+ }
6297
6317
  >
6298
6318
  }
6299
6319
 
@@ -6366,6 +6386,21 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6366
6386
  value?: {} | DataLink | EventProperty
6367
6387
  mapping?: string
6368
6388
  }
6389
+ | {
6390
+ input: 'chatTemplateKwargs'
6391
+ value?: {} | DataLink | EventProperty
6392
+ mapping?: string
6393
+ }
6394
+ | {
6395
+ input: 'addGenerationPrompt'
6396
+ value?: boolean | DataLink | EventProperty
6397
+ mapping?: string
6398
+ }
6399
+ | {
6400
+ input: 'now'
6401
+ value?: string | DataLink | EventProperty
6402
+ mapping?: string
6403
+ }
6369
6404
  | {
6370
6405
  input: 'grammar'
6371
6406
  value?: string | DataLink | EventProperty
@@ -6557,6 +6592,7 @@ Default property:
6557
6592
  "cacheKType": "f16",
6558
6593
  "cacheVType": "f16",
6559
6594
  "ctxShift": true,
6595
+ "cpuMoeLayers": 0,
6560
6596
  "transformScriptEnabled": false,
6561
6597
  "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables }, members = { llmUtils } \*\/\nreturn inputs.prompt",
6562
6598
  "transformScriptVariables": {},
@@ -6566,23 +6602,13 @@ Default property:
6566
6602
  "completionPrompt": "",
6567
6603
  "completionPromptTemplateType": "${}",
6568
6604
  "completionEnableThinking": true,
6605
+ "completionAddGenerationPrompt": true,
6606
+ "completionChatTemplateKwargs": {},
6569
6607
  "completionUseReasoningFormat": "auto",
6570
- "completionStopWords": [
6571
- "</s>",
6572
- "<|end|>",
6573
- "<|eot_id|>",
6574
- "<|end_of_text|>",
6575
- "<|im_end|>",
6576
- "<|EOT|>",
6577
- "<|END_OF_TURN_TOKEN|>",
6578
- "<|end_of_turn|>",
6579
- "<|endoftext|>",
6580
- "<eos>",
6581
- "<end_of_turn>"
6582
- ],
6608
+ "completionStopWords": [],
6583
6609
  "completionPredict": 400,
6584
6610
  "completionTopK": 40,
6585
- "completionTopP": 0.5,
6611
+ "completionTopP": 0.95,
6586
6612
  "completionMinP": 0.05,
6587
6613
  "completionDryMultiplier": 0,
6588
6614
  "completionDryBase": 1.75,
@@ -6596,7 +6622,7 @@ Default property:
6596
6622
  "completionMirostat": 0,
6597
6623
  "completionMirostatTau": 5,
6598
6624
  "completionMirostatEta": 0.1,
6599
- "completionPenaltyLastN": 256,
6625
+ "completionPenaltyLastN": 64,
6600
6626
  "completionPenaltyRepeat": 1,
6601
6627
  "completionPenaltyFrequency": 0,
6602
6628
  "completionPenaltyPresent": 0,
@@ -6647,7 +6673,7 @@ Default property:
6647
6673
  /* Use mmap */
6648
6674
  useMmap?: boolean | DataLink
6649
6675
  /* Use Flash Attention for inference (Recommended with GPU enabled) */
6650
- useFlashAttn?: boolean | DataLink
6676
+ useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
6651
6677
  /* KV cache data type for the K (Default: f16) */
6652
6678
  cacheKType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
6653
6679
  /* KV cache data type for the V (Default: f16) */
@@ -6658,6 +6684,8 @@ Default property:
6658
6684
  useSwaFull?: boolean | DataLink
6659
6685
  /* Enable context shift */
6660
6686
  ctxShift?: boolean | DataLink
6687
+ /* Number of layers to keep MoE weights on CPU */
6688
+ cpuMoeLayers?: number | DataLink
6661
6689
  /* Enable Transform Script for processing the prompt */
6662
6690
  transformScriptEnabled?: boolean | DataLink
6663
6691
  /* Code of Transform Script */
@@ -6718,6 +6746,12 @@ Default property:
6718
6746
  }
6719
6747
  /* Enable thinking */
6720
6748
  completionEnableThinking?: boolean | DataLink
6749
+ /* Add generation prompt */
6750
+ completionAddGenerationPrompt?: boolean | DataLink
6751
+ /* Now (for fill current date in chat template if supported) */
6752
+ completionNow?: string | DataLink
6753
+ /* Additional keyword arguments for chat template (object) */
6754
+ completionChatTemplateKwargs?: {} | DataLink
6721
6755
  /* Use reasoning format for enhanced response structure
6722
6756
  `auto` - Auto-determine the reasoning format of the model
6723
6757
  `none` - Disable reasoning format */
@@ -6916,7 +6950,7 @@ Default property:
6916
6950
  "gpuLayers": 0,
6917
6951
  "useMlock": true,
6918
6952
  "useMmap": true,
6919
- "useFlashAttn": false
6953
+ "useFlashAttn": "off"
6920
6954
  }
6921
6955
  */
6922
6956
  property?: {
@@ -6989,7 +7023,7 @@ Default property:
6989
7023
  /* Use mmap */
6990
7024
  useMmap?: boolean | DataLink
6991
7025
  /* Use Flash Attention for inference (Recommended with GPU enabled) */
6992
- useFlashAttn?: boolean | DataLink
7026
+ useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
6993
7027
  }
6994
7028
  events?: {
6995
7029
  /* Event triggered when state change */
@@ -777,6 +777,12 @@ export const templateEventPropsMap = {
777
777
  GENERATOR_REALTIME_TRANSCRIPTION: {
778
778
  onTranscribe: [
779
779
  'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_EVENT', // type: object
780
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_TYPE', // type: string
781
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_SLICE_INDEX', // type: number
782
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_RESULT_TEXT', // type: string
783
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_IS_CAPTURING', // type: bool
784
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT', // type: object
785
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_TYPE', // type: string
780
786
  ],
781
787
  onVad: [
782
788
  'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT', // type: object