@fugood/bricks-project 2.22.0-beta.24 → 2.22.0-beta.26
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.
- package/compile/action-name-map.ts +6 -0
- package/package.json +2 -2
- package/types/generators.ts +47 -18
- package/utils/data.ts +27 -0
- package/utils/event-props.ts +6 -0
|
@@ -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.
|
|
3
|
+
"version": "2.22.0-beta.26",
|
|
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": "
|
|
17
|
+
"gitHead": "7d2bf8e3b93d8b58295801a9ccaff1926f9736c0"
|
|
18
18
|
}
|
package/types/generators.ts
CHANGED
|
@@ -6294,6 +6294,21 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
|
|
|
6294
6294
|
value?: {} | DataLink | EventProperty
|
|
6295
6295
|
mapping?: string
|
|
6296
6296
|
}
|
|
6297
|
+
| {
|
|
6298
|
+
input: 'chatTemplateKwargs'
|
|
6299
|
+
value?: {} | DataLink | EventProperty
|
|
6300
|
+
mapping?: string
|
|
6301
|
+
}
|
|
6302
|
+
| {
|
|
6303
|
+
input: 'addGenerationPrompt'
|
|
6304
|
+
value?: boolean | DataLink | EventProperty
|
|
6305
|
+
mapping?: string
|
|
6306
|
+
}
|
|
6307
|
+
| {
|
|
6308
|
+
input: 'now'
|
|
6309
|
+
value?: string | DataLink | EventProperty
|
|
6310
|
+
mapping?: string
|
|
6311
|
+
}
|
|
6297
6312
|
>
|
|
6298
6313
|
}
|
|
6299
6314
|
|
|
@@ -6366,6 +6381,21 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
|
|
|
6366
6381
|
value?: {} | DataLink | EventProperty
|
|
6367
6382
|
mapping?: string
|
|
6368
6383
|
}
|
|
6384
|
+
| {
|
|
6385
|
+
input: 'chatTemplateKwargs'
|
|
6386
|
+
value?: {} | DataLink | EventProperty
|
|
6387
|
+
mapping?: string
|
|
6388
|
+
}
|
|
6389
|
+
| {
|
|
6390
|
+
input: 'addGenerationPrompt'
|
|
6391
|
+
value?: boolean | DataLink | EventProperty
|
|
6392
|
+
mapping?: string
|
|
6393
|
+
}
|
|
6394
|
+
| {
|
|
6395
|
+
input: 'now'
|
|
6396
|
+
value?: string | DataLink | EventProperty
|
|
6397
|
+
mapping?: string
|
|
6398
|
+
}
|
|
6369
6399
|
| {
|
|
6370
6400
|
input: 'grammar'
|
|
6371
6401
|
value?: string | DataLink | EventProperty
|
|
@@ -6557,6 +6587,7 @@ Default property:
|
|
|
6557
6587
|
"cacheKType": "f16",
|
|
6558
6588
|
"cacheVType": "f16",
|
|
6559
6589
|
"ctxShift": true,
|
|
6590
|
+
"cpuMoeLayers": 0,
|
|
6560
6591
|
"transformScriptEnabled": false,
|
|
6561
6592
|
"transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables }, members = { llmUtils } \*\/\nreturn inputs.prompt",
|
|
6562
6593
|
"transformScriptVariables": {},
|
|
@@ -6566,23 +6597,13 @@ Default property:
|
|
|
6566
6597
|
"completionPrompt": "",
|
|
6567
6598
|
"completionPromptTemplateType": "${}",
|
|
6568
6599
|
"completionEnableThinking": true,
|
|
6600
|
+
"completionAddGenerationPrompt": true,
|
|
6601
|
+
"completionChatTemplateKwargs": {},
|
|
6569
6602
|
"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
|
-
],
|
|
6603
|
+
"completionStopWords": [],
|
|
6583
6604
|
"completionPredict": 400,
|
|
6584
6605
|
"completionTopK": 40,
|
|
6585
|
-
"completionTopP": 0.
|
|
6606
|
+
"completionTopP": 0.95,
|
|
6586
6607
|
"completionMinP": 0.05,
|
|
6587
6608
|
"completionDryMultiplier": 0,
|
|
6588
6609
|
"completionDryBase": 1.75,
|
|
@@ -6596,7 +6617,7 @@ Default property:
|
|
|
6596
6617
|
"completionMirostat": 0,
|
|
6597
6618
|
"completionMirostatTau": 5,
|
|
6598
6619
|
"completionMirostatEta": 0.1,
|
|
6599
|
-
"completionPenaltyLastN":
|
|
6620
|
+
"completionPenaltyLastN": 64,
|
|
6600
6621
|
"completionPenaltyRepeat": 1,
|
|
6601
6622
|
"completionPenaltyFrequency": 0,
|
|
6602
6623
|
"completionPenaltyPresent": 0,
|
|
@@ -6647,7 +6668,7 @@ Default property:
|
|
|
6647
6668
|
/* Use mmap */
|
|
6648
6669
|
useMmap?: boolean | DataLink
|
|
6649
6670
|
/* Use Flash Attention for inference (Recommended with GPU enabled) */
|
|
6650
|
-
useFlashAttn?:
|
|
6671
|
+
useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
|
|
6651
6672
|
/* KV cache data type for the K (Default: f16) */
|
|
6652
6673
|
cacheKType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
|
|
6653
6674
|
/* KV cache data type for the V (Default: f16) */
|
|
@@ -6658,6 +6679,8 @@ Default property:
|
|
|
6658
6679
|
useSwaFull?: boolean | DataLink
|
|
6659
6680
|
/* Enable context shift */
|
|
6660
6681
|
ctxShift?: boolean | DataLink
|
|
6682
|
+
/* Number of layers to keep MoE weights on CPU */
|
|
6683
|
+
cpuMoeLayers?: number | DataLink
|
|
6661
6684
|
/* Enable Transform Script for processing the prompt */
|
|
6662
6685
|
transformScriptEnabled?: boolean | DataLink
|
|
6663
6686
|
/* Code of Transform Script */
|
|
@@ -6718,6 +6741,12 @@ Default property:
|
|
|
6718
6741
|
}
|
|
6719
6742
|
/* Enable thinking */
|
|
6720
6743
|
completionEnableThinking?: boolean | DataLink
|
|
6744
|
+
/* Add generation prompt */
|
|
6745
|
+
completionAddGenerationPrompt?: boolean | DataLink
|
|
6746
|
+
/* Now (for fill current date in chat template if supported) */
|
|
6747
|
+
completionNow?: string | DataLink
|
|
6748
|
+
/* Additional keyword arguments for chat template (object) */
|
|
6749
|
+
completionChatTemplateKwargs?: {} | DataLink
|
|
6721
6750
|
/* Use reasoning format for enhanced response structure
|
|
6722
6751
|
`auto` - Auto-determine the reasoning format of the model
|
|
6723
6752
|
`none` - Disable reasoning format */
|
|
@@ -6916,7 +6945,7 @@ Default property:
|
|
|
6916
6945
|
"gpuLayers": 0,
|
|
6917
6946
|
"useMlock": true,
|
|
6918
6947
|
"useMmap": true,
|
|
6919
|
-
"useFlashAttn":
|
|
6948
|
+
"useFlashAttn": "off"
|
|
6920
6949
|
}
|
|
6921
6950
|
*/
|
|
6922
6951
|
property?: {
|
|
@@ -6989,7 +7018,7 @@ Default property:
|
|
|
6989
7018
|
/* Use mmap */
|
|
6990
7019
|
useMmap?: boolean | DataLink
|
|
6991
7020
|
/* Use Flash Attention for inference (Recommended with GPU enabled) */
|
|
6992
|
-
useFlashAttn?:
|
|
7021
|
+
useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
|
|
6993
7022
|
}
|
|
6994
7023
|
events?: {
|
|
6995
7024
|
/* Event triggered when state change */
|
package/utils/data.ts
CHANGED
|
@@ -76,6 +76,9 @@ type SystemDataName =
|
|
|
76
76
|
| 'isViewDebugModeEnabled'
|
|
77
77
|
| 'language'
|
|
78
78
|
| 'aiFilters'
|
|
79
|
+
| 'systemOpenAIApiKey'
|
|
80
|
+
| 'systemAnthropicApiKey'
|
|
81
|
+
| 'systemGeminiApiKey'
|
|
79
82
|
|
|
80
83
|
type SystemDataInfo = {
|
|
81
84
|
name: SystemDataName
|
|
@@ -441,6 +444,30 @@ export const systemDataList: Array<SystemDataInfo> = [
|
|
|
441
444
|
type: 'array',
|
|
442
445
|
value: [],
|
|
443
446
|
},
|
|
447
|
+
{
|
|
448
|
+
name: 'systemOpenAIApiKey',
|
|
449
|
+
id: 'PROPERTY_BANK_DATA_NODE_a1b2c3d4-5e6f-7890-abcd-ef1234567890',
|
|
450
|
+
title: 'SYSTEM: OpenAI API Key',
|
|
451
|
+
description: 'System OpenAI API Key (only available if application enabled)',
|
|
452
|
+
type: 'string',
|
|
453
|
+
value: '',
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: 'systemAnthropicApiKey',
|
|
457
|
+
id: 'PROPERTY_BANK_DATA_NODE_b2c3d4e5-6f78-9012-bcde-f23456789012',
|
|
458
|
+
title: 'SYSTEM: Anthropic API Key',
|
|
459
|
+
description: 'System Anthropic API Key (only available if application enabled)',
|
|
460
|
+
type: 'string',
|
|
461
|
+
value: '',
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: 'systemGeminiApiKey',
|
|
465
|
+
id: 'PROPERTY_BANK_DATA_NODE_c3d4e5f6-7890-1234-cdef-345678901234',
|
|
466
|
+
title: 'SYSTEM: Gemini API Key',
|
|
467
|
+
description: 'System Gemini API Key (only available if application enabled)',
|
|
468
|
+
type: 'string',
|
|
469
|
+
value: '',
|
|
470
|
+
},
|
|
444
471
|
]
|
|
445
472
|
|
|
446
473
|
export const useSystemData = (name: SystemDataName): Data => {
|
package/utils/event-props.ts
CHANGED
|
@@ -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
|