@fugood/bricks-project 2.21.0-beta.22 → 2.21.0-beta.24

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.
@@ -31,6 +31,8 @@ export const templateActionNameMap = {
31
31
  CHANGE_CANVAS: {
32
32
  canvasId: 'CANVAS_ID',
33
33
  canvasTitleLike: 'CANVAS_TITLE_LIKE',
34
+ canvasKeyMapList: 'CANVAS_KEY_MAP_LIST',
35
+ canvasKey: 'CANVAS_KEY',
34
36
  },
35
37
  MESSAGE: {
36
38
  type: 'SYSTEM_MESSAGE_TYPE',
@@ -471,6 +473,7 @@ export const templateActionNameMap = {
471
473
  },
472
474
  GENERATOR_LLM: {
473
475
  GENERATOR_LLM_PROCESS_PROMPT: {
476
+ sessionKey: 'GENERATOR_LLM_SESSION_KEY',
474
477
  mode: 'GENERATOR_LLM_MODE',
475
478
  messages: 'GENERATOR_LLM_MESSAGES',
476
479
  prompt: 'GENERATOR_LLM_PROMPT',
@@ -478,6 +481,7 @@ export const templateActionNameMap = {
478
481
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
479
482
  },
480
483
  GENERATOR_LLM_COMPLETION: {
484
+ sessionKey: 'GENERATOR_LLM_SESSION_KEY',
481
485
  mode: 'GENERATOR_LLM_MODE',
482
486
  messages: 'GENERATOR_LLM_MESSAGES',
483
487
  prompt: 'GENERATOR_LLM_PROMPT',
@@ -506,5 +510,9 @@ export const templateActionNameMap = {
506
510
  functionCallEnabled: 'GENERATOR_LLM_FUNCTION_CALL_ENABLED',
507
511
  functionCallSchema: 'GENERATOR_LLM_FUNCTION_CALL_SCHEMA',
508
512
  },
513
+ GENERATOR_LLM_CLEAR_SESSION: {
514
+ sessionId: 'GENERATOR_LLM_SESSION_ID',
515
+ sessionCustomKey: 'GENERATOR_LLM_SESSION_CUSTOM_KEY',
516
+ },
509
517
  },
510
518
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.22",
3
+ "version": "2.21.0-beta.24",
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": "3e8cf8167c1692f5e981c122f144ef4680cac28d"
16
+ "gitHead": "279cda43b8e705467a5a1562f610331aae178e8a"
17
17
  }
@@ -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
- /* SHA1 of model */
5940
- modelSha1?: string | DataLink
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 JSON */
6465
- modelMd5?: string | DataLink
6466
- /* Hash of model JSON */
6467
- modelHashType?: 'md5' | 'sha256' | DataLink
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 */
package/types/system.ts CHANGED
@@ -143,6 +143,16 @@ export type SystemActionChangeCanvas = ActionWithParams & {
143
143
  value?: string | DataLink
144
144
  mapping?: string
145
145
  }
146
+ | {
147
+ input: 'canvasKeyMapList'
148
+ value?: {} | DataLink
149
+ mapping?: string
150
+ }
151
+ | {
152
+ input: 'canvasKey'
153
+ value?: string | DataLink
154
+ mapping?: string
155
+ }
146
156
  >
147
157
  }
148
158