@fugood/bricks-project 2.21.0-beta.22 → 2.21.0-beta.23
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 +35 -35
|
@@ -471,6 +471,7 @@ export const templateActionNameMap = {
|
|
|
471
471
|
},
|
|
472
472
|
GENERATOR_LLM: {
|
|
473
473
|
GENERATOR_LLM_PROCESS_PROMPT: {
|
|
474
|
+
sessionKey: 'GENERATOR_LLM_SESSION_KEY',
|
|
474
475
|
mode: 'GENERATOR_LLM_MODE',
|
|
475
476
|
messages: 'GENERATOR_LLM_MESSAGES',
|
|
476
477
|
prompt: 'GENERATOR_LLM_PROMPT',
|
|
@@ -478,6 +479,7 @@ export const templateActionNameMap = {
|
|
|
478
479
|
promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
|
|
479
480
|
},
|
|
480
481
|
GENERATOR_LLM_COMPLETION: {
|
|
482
|
+
sessionKey: 'GENERATOR_LLM_SESSION_KEY',
|
|
481
483
|
mode: 'GENERATOR_LLM_MODE',
|
|
482
484
|
messages: 'GENERATOR_LLM_MESSAGES',
|
|
483
485
|
prompt: 'GENERATOR_LLM_PROMPT',
|
|
@@ -506,5 +508,9 @@ export const templateActionNameMap = {
|
|
|
506
508
|
functionCallEnabled: 'GENERATOR_LLM_FUNCTION_CALL_ENABLED',
|
|
507
509
|
functionCallSchema: 'GENERATOR_LLM_FUNCTION_CALL_SCHEMA',
|
|
508
510
|
},
|
|
511
|
+
GENERATOR_LLM_CLEAR_SESSION: {
|
|
512
|
+
sessionId: 'GENERATOR_LLM_SESSION_ID',
|
|
513
|
+
sessionCustomKey: 'GENERATOR_LLM_SESSION_CUSTOM_KEY',
|
|
514
|
+
},
|
|
509
515
|
},
|
|
510
516
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.21.0-beta.
|
|
3
|
+
"version": "2.21.0-beta.23",
|
|
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": "
|
|
16
|
+
"gitHead": "d7d83d4425e118960bcbde76a7e66a2c2f4e7bdb"
|
|
17
17
|
}
|
package/types/generators.ts
CHANGED
|
@@ -5897,7 +5897,6 @@ Default property:
|
|
|
5897
5897
|
| 'base.en-q5_1'
|
|
5898
5898
|
| 'base.en-q8_0'
|
|
5899
5899
|
| 'small'
|
|
5900
|
-
| 'small-q5_0'
|
|
5901
5900
|
| 'small-q5_1'
|
|
5902
5901
|
| 'small-q8_0'
|
|
5903
5902
|
| 'small.en'
|
|
@@ -5905,7 +5904,6 @@ Default property:
|
|
|
5905
5904
|
| 'small.en-q8_0'
|
|
5906
5905
|
| 'medium'
|
|
5907
5906
|
| 'medium-q5_0'
|
|
5908
|
-
| 'medium-q5_1'
|
|
5909
5907
|
| 'medium-q8_0'
|
|
5910
5908
|
| 'medium.en'
|
|
5911
5909
|
| 'medium.en-q5_1'
|
|
@@ -5936,8 +5934,10 @@ Default property:
|
|
|
5936
5934
|
/* The URL or path of model
|
|
5937
5935
|
We used `ggml` format model, please refer to https://github.com/ggerganov/whisper.cpp/tree/master/models */
|
|
5938
5936
|
modelUrl?: string | DataLink
|
|
5939
|
-
/*
|
|
5940
|
-
|
|
5937
|
+
/* Hash type of model */
|
|
5938
|
+
modelHashType?: 'md5' | 'sha256' | 'sha1' | DataLink
|
|
5939
|
+
/* Hash of model */
|
|
5940
|
+
modelHash?: string | DataLink
|
|
5941
5941
|
/* [Unstable] iOS: Use CoreML model for inference */
|
|
5942
5942
|
modelUseCoreML?: boolean | DataLink
|
|
5943
5943
|
/* Use GPU Acceleration for inference. Currently iOS only, if it's enabled, Core ML option will be ignored. */
|
|
@@ -6197,6 +6197,11 @@ export type GeneratorLLMActionLoadModel = Action & {
|
|
|
6197
6197
|
export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
|
|
6198
6198
|
__actionName: 'GENERATOR_LLM_PROCESS_PROMPT'
|
|
6199
6199
|
params?: Array<
|
|
6200
|
+
| {
|
|
6201
|
+
input: 'sessionKey'
|
|
6202
|
+
value?: string | DataLink
|
|
6203
|
+
mapping?: string
|
|
6204
|
+
}
|
|
6200
6205
|
| {
|
|
6201
6206
|
input: 'mode'
|
|
6202
6207
|
value?: string | DataLink
|
|
@@ -6229,6 +6234,11 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
|
|
|
6229
6234
|
export type GeneratorLLMActionCompletion = ActionWithParams & {
|
|
6230
6235
|
__actionName: 'GENERATOR_LLM_COMPLETION'
|
|
6231
6236
|
params?: Array<
|
|
6237
|
+
| {
|
|
6238
|
+
input: 'sessionKey'
|
|
6239
|
+
value?: string | DataLink
|
|
6240
|
+
mapping?: string
|
|
6241
|
+
}
|
|
6232
6242
|
| {
|
|
6233
6243
|
input: 'mode'
|
|
6234
6244
|
value?: string | DataLink
|
|
@@ -6367,6 +6377,23 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
|
|
|
6367
6377
|
>
|
|
6368
6378
|
}
|
|
6369
6379
|
|
|
6380
|
+
/* Clear session with session key or session ID */
|
|
6381
|
+
export type GeneratorLLMActionClearSession = ActionWithParams & {
|
|
6382
|
+
__actionName: 'GENERATOR_LLM_CLEAR_SESSION'
|
|
6383
|
+
params?: Array<
|
|
6384
|
+
| {
|
|
6385
|
+
input: 'sessionId'
|
|
6386
|
+
value?: string | DataLink
|
|
6387
|
+
mapping?: string
|
|
6388
|
+
}
|
|
6389
|
+
| {
|
|
6390
|
+
input: 'sessionCustomKey'
|
|
6391
|
+
value?: string | DataLink
|
|
6392
|
+
mapping?: string
|
|
6393
|
+
}
|
|
6394
|
+
>
|
|
6395
|
+
}
|
|
6396
|
+
|
|
6370
6397
|
/* Stop text completion */
|
|
6371
6398
|
export type GeneratorLLMActionStopCompletion = Action & {
|
|
6372
6399
|
__actionName: 'GENERATOR_LLM_STOP_COMPLETION'
|
|
@@ -6387,8 +6414,6 @@ interface GeneratorLLMDef {
|
|
|
6387
6414
|
Default property:
|
|
6388
6415
|
{
|
|
6389
6416
|
"init": false,
|
|
6390
|
-
"modelType": "Custom",
|
|
6391
|
-
"modelQuantizedType": "q2_k",
|
|
6392
6417
|
"contextSize": 512,
|
|
6393
6418
|
"batchSize": 512,
|
|
6394
6419
|
"accelVariant": "default",
|
|
@@ -6436,38 +6461,13 @@ Default property:
|
|
|
6436
6461
|
/* Initialize the Llama context on generator initialization
|
|
6437
6462
|
Please note that it will take some RAM depending on the model size */
|
|
6438
6463
|
init?: boolean | DataLink
|
|
6439
|
-
/* Use model type, the model download progress will be done in preload stage or the generator initialization stage.
|
|
6440
|
-
We used GGUF format model, please refer to https://github.com/ggerganov/llama.cpp/tree/master#description
|
|
6441
|
-
You can also choose `Custom` option and set `Model URL` and `Model MD5` to use your own model.
|
|
6442
|
-
Please also read model license for fair use. */
|
|
6443
|
-
modelType?:
|
|
6444
|
-
| 'Custom'
|
|
6445
|
-
| '[Local] Llama 3 8B'
|
|
6446
|
-
| '[Local] Llama 3 8B Instruct'
|
|
6447
|
-
| '[Local] Llama 2 7B Chat'
|
|
6448
|
-
| '[Local] Llama 2 7B'
|
|
6449
|
-
| '[Local] Mistral 7B Instruct v0.2'
|
|
6450
|
-
| '[Local] Mistral 7B v0.1'
|
|
6451
|
-
| '[Local] Breeze 7B Instruct 64k v0.1'
|
|
6452
|
-
| '[Local] Falcon 7B'
|
|
6453
|
-
| '[Local] Gemma 2B Instruct'
|
|
6454
|
-
| '[Local] Gemma 2B'
|
|
6455
|
-
| '[Local] Phi-2 3B'
|
|
6456
|
-
| '[Local] OpenLLaMA 2 3B'
|
|
6457
|
-
| '[Local] TinyLlama 1.1B intermediate-step-1195k-token-2.5T'
|
|
6458
|
-
| DataLink
|
|
6459
|
-
/* Select quantized model, currently only provided `q2_k` / `q3_k` / `q4_0` (Default to `q2_k`, will use `q4_0` instead if K-Quants not supported) */
|
|
6460
|
-
modelQuantizedType?: 'q2_k' | 'q3_k' | 'q4_0' | DataLink
|
|
6461
6464
|
/* The URL or path of model
|
|
6462
6465
|
We used GGUF format model, please refer to https://github.com/ggerganov/llama.cpp/tree/master#description */
|
|
6463
6466
|
modelUrl?: string | DataLink
|
|
6464
|
-
/* Hash of model
|
|
6465
|
-
|
|
6466
|
-
/* Hash of model
|
|
6467
|
-
|
|
6468
|
-
/* Pre-process the prompt after model loaded, this can speed up the completion action.
|
|
6469
|
-
This doing the same thing as PROCESS_PROMPT action. */
|
|
6470
|
-
modelPreprocessPrompt?: boolean | DataLink
|
|
6467
|
+
/* Hash type of model */
|
|
6468
|
+
modelHashType?: 'md5' | 'sha256' | 'sha1' | DataLink
|
|
6469
|
+
/* Hash of model */
|
|
6470
|
+
modelHash?: string | DataLink
|
|
6471
6471
|
/* Context size (0 ~ 4096) (Default to 512) */
|
|
6472
6472
|
contextSize?: number | DataLink
|
|
6473
6473
|
/* Batch size */
|