@fugood/bricks-project 2.21.4 → 2.21.6
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 +4 -0
- package/package.json +1 -1
- package/types/generators.ts +76 -16
- package/utils/event-props.ts +2 -0
|
@@ -743,6 +743,10 @@ export const templateActionNameMap = {
|
|
|
743
743
|
mcpVariables: 'GENERATOR_ASSISTANT_MCP_VARIABLES',
|
|
744
744
|
role: 'GENERATOR_ASSISTANT_ROLE',
|
|
745
745
|
},
|
|
746
|
+
GENERATOR_ASSISTANT_SUMMARY_MESSAGES: {
|
|
747
|
+
summaryMessages: 'GENERATOR_ASSISTANT_SUMMARY_MESSAGES',
|
|
748
|
+
summarySessionKey: 'GENERATOR_ASSISTANT_SUMMARY_SESSION_KEY',
|
|
749
|
+
},
|
|
746
750
|
},
|
|
747
751
|
GENERATOR_VECTOR_STORE: {
|
|
748
752
|
GENERATOR_VECTOR_STORE_RESET: {
|
package/package.json
CHANGED
package/types/generators.ts
CHANGED
|
@@ -4312,11 +4312,6 @@ export type GeneratorMCPServerActionRefreshResources = Action & {
|
|
|
4312
4312
|
__actionName: 'GENERATOR_MCP_SERVER_REFRESH_RESOURCES'
|
|
4313
4313
|
}
|
|
4314
4314
|
|
|
4315
|
-
/* End stream */
|
|
4316
|
-
export type GeneratorMCPServerActionEndStream = Action & {
|
|
4317
|
-
__actionName: 'GENERATOR_MCP_SERVER_END_STREAM'
|
|
4318
|
-
}
|
|
4319
|
-
|
|
4320
4315
|
interface GeneratorMCPServerDef {
|
|
4321
4316
|
/*
|
|
4322
4317
|
Default property:
|
|
@@ -4497,6 +4492,8 @@ Default property:
|
|
|
4497
4492
|
isListening?: () => Data
|
|
4498
4493
|
/* Last error of HTTP server */
|
|
4499
4494
|
lastError?: () => Data
|
|
4495
|
+
/* MCP server endpoint URL */
|
|
4496
|
+
endpoint?: () => Data
|
|
4500
4497
|
/* Connected remotes (Session ID) */
|
|
4501
4498
|
connectedRemotes?: () => Data
|
|
4502
4499
|
/* Last resource request ({ name: string, uri: string, params: object }) */
|
|
@@ -4525,6 +4522,7 @@ export type GeneratorMCPServer = Generator &
|
|
|
4525
4522
|
outlet:
|
|
4526
4523
|
| 'isListening'
|
|
4527
4524
|
| 'lastError'
|
|
4525
|
+
| 'endpoint'
|
|
4528
4526
|
| 'connectedRemotes'
|
|
4529
4527
|
| 'lastResourceRequest'
|
|
4530
4528
|
| 'lastToolCall'
|
|
@@ -6173,6 +6171,7 @@ Default property:
|
|
|
6173
6171
|
"useMmap": true,
|
|
6174
6172
|
"cacheKType": "f16",
|
|
6175
6173
|
"cacheVType": "f16",
|
|
6174
|
+
"ctxShift": true,
|
|
6176
6175
|
"transformScriptEnabled": false,
|
|
6177
6176
|
"transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables } \*\/\nreturn inputs.prompt",
|
|
6178
6177
|
"transformScriptVariables": {},
|
|
@@ -6258,6 +6257,8 @@ Default property:
|
|
|
6258
6257
|
cacheKType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
|
|
6259
6258
|
/* KV cache data type for the V (Default: f16) */
|
|
6260
6259
|
cacheVType?: 'f16' | 'f32' | 'q8_0' | 'q4_0' | 'q4_1' | 'iq4_nl' | 'q5_0' | 'q5_1' | DataLink
|
|
6260
|
+
/* Enable context shift */
|
|
6261
|
+
ctxShift?: boolean | DataLink
|
|
6261
6262
|
/* Enable Transform Script for processing the prompt */
|
|
6262
6263
|
transformScriptEnabled?: boolean | DataLink
|
|
6263
6264
|
/* Code of Transform Script */
|
|
@@ -6276,8 +6277,10 @@ Default property:
|
|
|
6276
6277
|
sessionRemain?: number | DataLink
|
|
6277
6278
|
/* TODO:loran_gqarms_norm_epsrope_freq_baserope_freq_scale */
|
|
6278
6279
|
completionMode?: 'auto' | 'chat' | 'text' | DataLink
|
|
6279
|
-
/* Tools for chat mode
|
|
6280
|
-
|
|
6280
|
+
/* Tools for chat mode using OpenAI-compatible function calling format
|
|
6281
|
+
Format: Array of objects with {type, function: {name, description, parameters}} structure
|
|
6282
|
+
See: https://platform.openai.com/docs/guides/function-calling */
|
|
6283
|
+
completionTools?: Array<{} | DataLink> | DataLink
|
|
6281
6284
|
/* Enable parallel tool calls */
|
|
6282
6285
|
completionParallelToolCalls?: boolean | DataLink
|
|
6283
6286
|
/* Tool choice for chat mode */
|
|
@@ -6533,8 +6536,10 @@ Default property:
|
|
|
6533
6536
|
stopWords?: Array<string | DataLink> | DataLink
|
|
6534
6537
|
/* Tool call parser */
|
|
6535
6538
|
toolCallParser?: 'llama3_json' | 'mistral' | DataLink
|
|
6536
|
-
/* Tools for chat mode
|
|
6537
|
-
|
|
6539
|
+
/* Tools for chat mode using OpenAI-compatible function calling format
|
|
6540
|
+
Format: Array of objects with {type, function: {name, description, parameters}} structure
|
|
6541
|
+
See: https://platform.openai.com/docs/guides/function-calling */
|
|
6542
|
+
tools?: Array<{} | DataLink> | DataLink
|
|
6538
6543
|
/* Tool choice for chat mode */
|
|
6539
6544
|
toolChoice?: 'none' | 'auto' | 'required' | DataLink
|
|
6540
6545
|
/* Enable parallel tool calls */
|
|
@@ -6677,7 +6682,10 @@ Default property:
|
|
|
6677
6682
|
"apiEndpoint": "https://api.openai.com/v1",
|
|
6678
6683
|
"model": "gpt-4o-mini",
|
|
6679
6684
|
"completionMessages": [
|
|
6680
|
-
|
|
6685
|
+
{
|
|
6686
|
+
"role": "system",
|
|
6687
|
+
"content": "You are a helpful assistant."
|
|
6688
|
+
}
|
|
6681
6689
|
],
|
|
6682
6690
|
"completionMaxTokens": 1024,
|
|
6683
6691
|
"completionTemperature": 1,
|
|
@@ -6713,8 +6721,10 @@ Default property:
|
|
|
6713
6721
|
}
|
|
6714
6722
|
>
|
|
6715
6723
|
| DataLink
|
|
6716
|
-
/* Tools for chat mode
|
|
6717
|
-
|
|
6724
|
+
/* Tools for chat mode following OpenAI function calling format
|
|
6725
|
+
Format: Array of objects with {type, function: {name, description, parameters}} structure
|
|
6726
|
+
See: https://platform.openai.com/docs/guides/function-calling */
|
|
6727
|
+
completionTools?: Array<{} | DataLink> | DataLink
|
|
6718
6728
|
/* Enable parallel tool calls */
|
|
6719
6729
|
completionParallelToolCalls?: boolean | DataLink
|
|
6720
6730
|
/* Tool choice for chat mode */
|
|
@@ -7223,16 +7233,50 @@ export type GeneratorAssistantActionInsertMcpResource = ActionWithParams & {
|
|
|
7223
7233
|
>
|
|
7224
7234
|
}
|
|
7225
7235
|
|
|
7236
|
+
/* Summarize messages based on the conversation
|
|
7237
|
+
|
|
7238
|
+
Note: Summary uses the same LLM context size, so it is recommended only to use it when the system prompt (in Initial Messages) is long, otherwise it may still fail when the context is full (Ctx Shift is NO). */
|
|
7239
|
+
export type GeneratorAssistantActionSummaryMessages = ActionWithParams & {
|
|
7240
|
+
__actionName: 'GENERATOR_ASSISTANT_SUMMARY_MESSAGES'
|
|
7241
|
+
params?: Array<
|
|
7242
|
+
| {
|
|
7243
|
+
input: 'summaryMessages'
|
|
7244
|
+
value?: Array<any> | DataLink | EventProperty
|
|
7245
|
+
mapping?: string
|
|
7246
|
+
}
|
|
7247
|
+
| {
|
|
7248
|
+
input: 'summarySessionKey'
|
|
7249
|
+
value?: string | DataLink | EventProperty
|
|
7250
|
+
mapping?: string
|
|
7251
|
+
}
|
|
7252
|
+
>
|
|
7253
|
+
}
|
|
7254
|
+
|
|
7226
7255
|
interface GeneratorAssistantDef {
|
|
7227
7256
|
/*
|
|
7228
7257
|
Default property:
|
|
7229
7258
|
{
|
|
7230
7259
|
"initialMessages": [
|
|
7231
|
-
|
|
7260
|
+
{
|
|
7261
|
+
"role": "system",
|
|
7262
|
+
"content": "You are a helpful assistant."
|
|
7263
|
+
}
|
|
7232
7264
|
],
|
|
7233
7265
|
"cacheMessages": false,
|
|
7234
7266
|
"llmLivePolicy": "only-in-use",
|
|
7235
7267
|
"llmSessionKey": "default-assistant",
|
|
7268
|
+
"llmAutoSummaryMessages": false,
|
|
7269
|
+
"llmSummaryMessages": [
|
|
7270
|
+
{
|
|
7271
|
+
"role": "system",
|
|
7272
|
+
"content": "You are a helpful assistant specialized in summarizing conversations. Create a concise summary of the conversation that captures the key points while maintaining important context. The summary should be clear, accurate, and briefer than the original conversation."
|
|
7273
|
+
},
|
|
7274
|
+
{
|
|
7275
|
+
"role": "user",
|
|
7276
|
+
"content": "Please summarize the following conversation into a concise system message that can replace the previous conversation context while maintaining all important information. Here is the conversation to summarize:\n\n"
|
|
7277
|
+
}
|
|
7278
|
+
],
|
|
7279
|
+
"llmSummarySessionKey": "assistant-default-summary",
|
|
7236
7280
|
"fileSearchEnabled": false,
|
|
7237
7281
|
"fileSearchLivePolicy": "only-in-use",
|
|
7238
7282
|
"sttEnabled": true,
|
|
@@ -7256,12 +7300,28 @@ Default property:
|
|
|
7256
7300
|
| DataLink
|
|
7257
7301
|
/* Whether to cache messages */
|
|
7258
7302
|
cacheMessages?: boolean | DataLink
|
|
7259
|
-
/* LLM Generator (
|
|
7303
|
+
/* LLM Generator (Supports `LLM (GGML)` and `OpenAI LLM` generators) */
|
|
7260
7304
|
llmGeneratorId?: string | DataLink
|
|
7261
7305
|
/* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use. */
|
|
7262
7306
|
llmLivePolicy?: 'only-in-use' | 'manual' | DataLink
|
|
7263
7307
|
/* LLM main session key */
|
|
7264
7308
|
llmSessionKey?: string | DataLink
|
|
7309
|
+
/* Auto Summary Messages (Automatically summarize messages when the LLM context is full or content gets truncated, currently only supported with LLM (GGML) generators)
|
|
7310
|
+
|
|
7311
|
+
Note: Summary uses the same LLM context size, so it is recommended only to use it when the system prompt (in Initial Messages) is long, otherwise it may still fail when the context is full (Ctx Shift is NO). */
|
|
7312
|
+
llmAutoSummaryMessages?: boolean | DataLink
|
|
7313
|
+
/* Summary Messages (Messages used for summarization prompt, conversation will be appended to the last message) */
|
|
7314
|
+
llmSummaryMessages?:
|
|
7315
|
+
| Array<
|
|
7316
|
+
| DataLink
|
|
7317
|
+
| {
|
|
7318
|
+
role?: string | DataLink
|
|
7319
|
+
content?: string | DataLink
|
|
7320
|
+
}
|
|
7321
|
+
>
|
|
7322
|
+
| DataLink
|
|
7323
|
+
/* Summary Session Key (Custom session key for summarization) */
|
|
7324
|
+
llmSummarySessionKey?: string | DataLink
|
|
7265
7325
|
/* File Search (Vector Store) Enabled */
|
|
7266
7326
|
fileSearchEnabled?: boolean | DataLink
|
|
7267
7327
|
/* File Search (Vector Store) Generator */
|
|
@@ -7274,13 +7334,13 @@ Default property:
|
|
|
7274
7334
|
fileSearchThreshold?: number | DataLink
|
|
7275
7335
|
/* File Search Ignore Threshold. (Default: false) */
|
|
7276
7336
|
fileSearchIgnoreThreshold?: boolean | DataLink
|
|
7277
|
-
/* STT Generator use for transcribing audio message (
|
|
7337
|
+
/* STT Generator use for transcribing audio message (Supports `STT (GGML)` generators) */
|
|
7278
7338
|
sttGeneratorId?: string | DataLink
|
|
7279
7339
|
/* STT Enabled */
|
|
7280
7340
|
sttEnabled?: boolean | DataLink
|
|
7281
7341
|
/* STT Live Policy. If the policy is `only-in-use`, the STT context will be released when the assistant is not in use. */
|
|
7282
7342
|
sttLivePolicy?: 'only-in-use' | 'manual' | DataLink
|
|
7283
|
-
/* TTS Generator use for generating LLM response audio message (
|
|
7343
|
+
/* TTS Generator use for generating LLM response audio message (Supports `TTS (ONNX)` and `OpenAI TTS` generators) */
|
|
7284
7344
|
ttsGeneratorId?: string | DataLink
|
|
7285
7345
|
/* TTS Enabled */
|
|
7286
7346
|
ttsEnabled?: boolean | DataLink
|
package/utils/event-props.ts
CHANGED
|
@@ -785,6 +785,8 @@ export const templateEventPropsMap = {
|
|
|
785
785
|
'GENERATOR_LLM_COMPLETION_RESULT', // type: string
|
|
786
786
|
'GENERATOR_LLM_COMPLETION_TOOL_CALLS', // type: array
|
|
787
787
|
'GENERATOR_LLM_COMPLETION_FULL_CONTEXT', // type: string
|
|
788
|
+
'GENERATOR_LLM_COMPLETION_IS_CONTEXT_FULL', // type: bool
|
|
789
|
+
'GENERATOR_LLM_COMPLETION_IS_TRUNCATED', // type: bool
|
|
788
790
|
'GENERATOR_LLM_COMPLETION_RESULT_DETAILS', // type: object
|
|
789
791
|
],
|
|
790
792
|
onCompletionFunctionCall: [
|