@fugood/bricks-project 2.21.0-beta.33 → 2.21.0-beta.34

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.
@@ -529,17 +529,25 @@ export const templateActionNameMap = {
529
529
  sessionKey: 'GENERATOR_LLM_SESSION_KEY',
530
530
  mode: 'GENERATOR_LLM_MODE',
531
531
  messages: 'GENERATOR_LLM_MESSAGES',
532
+ tools: 'GENERATOR_LLM_TOOLS',
533
+ parallelToolCalls: 'GENERATOR_LLM_PARALLEL_TOOL_CALLS',
534
+ toolChoice: 'GENERATOR_LLM_TOOL_CHOICE',
532
535
  prompt: 'GENERATOR_LLM_PROMPT',
533
536
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
534
537
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
538
+ responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
535
539
  },
536
540
  GENERATOR_LLM_COMPLETION: {
537
541
  sessionKey: 'GENERATOR_LLM_SESSION_KEY',
538
542
  mode: 'GENERATOR_LLM_MODE',
539
543
  messages: 'GENERATOR_LLM_MESSAGES',
544
+ tools: 'GENERATOR_LLM_TOOLS',
545
+ parallelToolCalls: 'GENERATOR_LLM_PARALLEL_TOOL_CALLS',
546
+ toolChoice: 'GENERATOR_LLM_TOOL_CHOICE',
540
547
  prompt: 'GENERATOR_LLM_PROMPT',
541
548
  promptTemplateData: 'GENERATOR_LLM_PROMPT_TEMPLATE_DATA',
542
549
  promptTemplateType: 'GENERATOR_LLM_PROMPT_TEMPLATE_TYPE',
550
+ responseFormat: 'GENERATOR_LLM_RESPONSE_FORMAT',
543
551
  grammar: 'GENERATOR_LLM_GRAMMAR',
544
552
  stopWords: 'GENERATOR_LLM_STOP_WORDS',
545
553
  predict: 'GENERATOR_LLM_PREDICT',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.33",
3
+ "version": "2.21.0-beta.34",
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": "822e1acd83733abd809268bd2719f689e6cb8138"
16
+ "gitHead": "8a64292b4f84242e10cde574f33c88ceefc7754e"
17
17
  }
@@ -6088,6 +6088,21 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6088
6088
  value?: Array<any> | DataLink
6089
6089
  mapping?: string
6090
6090
  }
6091
+ | {
6092
+ input: 'tools'
6093
+ value?: Array<any> | DataLink
6094
+ mapping?: string
6095
+ }
6096
+ | {
6097
+ input: 'parallelToolCalls'
6098
+ value?: boolean | DataLink
6099
+ mapping?: string
6100
+ }
6101
+ | {
6102
+ input: 'toolChoice'
6103
+ value?: string | DataLink
6104
+ mapping?: string
6105
+ }
6091
6106
  | {
6092
6107
  input: 'prompt'
6093
6108
  value?: string | DataLink
@@ -6103,6 +6118,11 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
6103
6118
  value?: string | DataLink
6104
6119
  mapping?: string
6105
6120
  }
6121
+ | {
6122
+ input: 'responseFormat'
6123
+ value?: {} | DataLink
6124
+ mapping?: string
6125
+ }
6106
6126
  >
6107
6127
  }
6108
6128
 
@@ -6125,6 +6145,21 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6125
6145
  value?: Array<any> | DataLink
6126
6146
  mapping?: string
6127
6147
  }
6148
+ | {
6149
+ input: 'tools'
6150
+ value?: Array<any> | DataLink
6151
+ mapping?: string
6152
+ }
6153
+ | {
6154
+ input: 'parallelToolCalls'
6155
+ value?: boolean | DataLink
6156
+ mapping?: string
6157
+ }
6158
+ | {
6159
+ input: 'toolChoice'
6160
+ value?: string | DataLink
6161
+ mapping?: string
6162
+ }
6128
6163
  | {
6129
6164
  input: 'prompt'
6130
6165
  value?: string | DataLink
@@ -6140,6 +6175,11 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
6140
6175
  value?: string | DataLink
6141
6176
  mapping?: string
6142
6177
  }
6178
+ | {
6179
+ input: 'responseFormat'
6180
+ value?: {} | DataLink
6181
+ mapping?: string
6182
+ }
6143
6183
  | {
6144
6184
  input: 'grammar'
6145
6185
  value?: string | DataLink
@@ -6381,6 +6421,8 @@ Default property:
6381
6421
  modelHashType?: 'md5' | 'sha256' | 'sha1' | DataLink
6382
6422
  /* Hash of model */
6383
6423
  modelHash?: string | DataLink
6424
+ /* Chat Template (Jinja format) to override the default template from model */
6425
+ chatTemplate?: string | DataLink
6384
6426
  /* Context size (0 ~ 4096) (Default to 512) */
6385
6427
  contextSize?: number | DataLink
6386
6428
  /* Logical batch size for prompt processing */
@@ -6414,10 +6456,6 @@ Default property:
6414
6456
  transformScriptCode?: string | DataLink
6415
6457
  /* Variables used in Transform Script (object) */
6416
6458
  transformScriptVariables?: {} | DataLink
6417
- /* Enable function calling. This will disable the grammar setting */
6418
- functionCallEnabled?: boolean | DataLink
6419
- /* The function calling schema (similar to https://platform.openai.com/docs/guides/gpt/function-calling) */
6420
- functionCallSchema?: Array<DataLink | {}> | DataLink
6421
6459
  /* Session save mode
6422
6460
  `none` - No session saving
6423
6461
  `prompt` - Save session when prompt processed
@@ -6430,6 +6468,12 @@ Default property:
6430
6468
  sessionRemain?: number | DataLink
6431
6469
  /* TODO:loran_gqarms_norm_epsrope_freq_baserope_freq_scale */
6432
6470
  completionMode?: 'auto' | 'chat' | 'text' | DataLink
6471
+ /* Tools for chat mode */
6472
+ completionTools?: {} | DataLink
6473
+ /* Enable parallel tool calls */
6474
+ completionParallelToolCalls?: boolean | DataLink
6475
+ /* Tool choice for chat mode */
6476
+ completionToolChoice?: 'none' | 'auto' | 'required' | DataLink
6433
6477
  /* Messages (chat mode) */
6434
6478
  completionMessages?:
6435
6479
  | Array<
@@ -6446,6 +6490,19 @@ Default property:
6446
6490
  completionPromptTemplateData?: {} | DataLink
6447
6491
  /* The prompt template type */
6448
6492
  completionPromptTemplateType?: '${}' | '{{}}' | DataLink
6493
+ /* Response format */
6494
+ completionResponseFormat?:
6495
+ | DataLink
6496
+ | {
6497
+ type?: 'text' | 'json_schema' | 'json_object' | DataLink
6498
+ json_schema?:
6499
+ | DataLink
6500
+ | {
6501
+ strict?: boolean | DataLink
6502
+ schema?: {} | DataLink
6503
+ }
6504
+ schema?: {} | DataLink
6505
+ }
6449
6506
  /* Stop words */
6450
6507
  completionStopWords?: Array<string | DataLink> | DataLink
6451
6508
  /* Number of tokens to predict */
@@ -6563,6 +6620,10 @@ Default property:
6563
6620
  type: 'string'
6564
6621
  path: string
6565
6622
  }
6623
+ completionToolCalls: {
6624
+ type: 'array'
6625
+ path: string
6626
+ }
6566
6627
  completionFullContext: {
6567
6628
  type: 'string'
6568
6629
  path: string
@@ -6619,8 +6680,6 @@ Default property:
6619
6680
  completionFullContext?: () => Data
6620
6681
  /* Inference result details */
6621
6682
  completionResultDetails?: () => Data
6622
- /* Last function call details */
6623
- completionLastFunctionCall?: () => Data
6624
6683
  }
6625
6684
  }
6626
6685
 
@@ -6656,7 +6715,6 @@ export type GeneratorLLM = Generator &
6656
6715
  | 'completionResult'
6657
6716
  | 'completionFullContext'
6658
6717
  | 'completionResultDetails'
6659
- | 'completionLastFunctionCall'
6660
6718
  value: any
6661
6719
  }
6662
6720
  }>
@@ -6764,6 +6822,24 @@ Default property:
6764
6822
  }
6765
6823
  >
6766
6824
  | DataLink
6825
+ /* Tools for chat mode */
6826
+ completionTools?: {} | DataLink
6827
+ /* Enable parallel tool calls */
6828
+ completionParallelToolCalls?: boolean | DataLink
6829
+ /* Tool choice for chat mode */
6830
+ completionToolChoice?: 'none' | 'auto' | 'required' | DataLink
6831
+ /* Response format */
6832
+ completionResponseFormat?:
6833
+ | DataLink
6834
+ | {
6835
+ type?: 'text' | 'json_schema' | 'json_object' | DataLink
6836
+ json_schema?:
6837
+ | DataLink
6838
+ | {
6839
+ strict?: boolean | DataLink
6840
+ schema?: {} | DataLink
6841
+ }
6842
+ }
6767
6843
  /* Maximum tokens to generate */
6768
6844
  completionMaxTokens?: number | DataLink
6769
6845
  /* Temperature */
@@ -6776,10 +6852,6 @@ Default property:
6776
6852
  completionPresencePenalty?: number | DataLink
6777
6853
  /* Stop sequences */
6778
6854
  completionStop?: Array<string | DataLink> | DataLink
6779
- /* Enable function calling. */
6780
- functionCallEnabled?: boolean | DataLink
6781
- /* The function calling schema (ref: https://platform.openai.com/docs/guides/gpt/function-calling) */
6782
- functionCallSchema?: Array<DataLink | {}> | DataLink
6783
6855
  }
6784
6856
  events?: {
6785
6857
  /* Error event */