diff --git a/ui-ngx/src/app/core/services/menu.models.ts b/ui-ngx/src/app/core/services/menu.models.ts index b660b0ab0d..dc568c148e 100644 --- a/ui-ngx/src/app/core/services/menu.models.ts +++ b/ui-ngx/src/app/core/services/menu.models.ts @@ -794,7 +794,6 @@ const defaultUserMenuMap = new Map([ {id: MenuId.home}, {id: MenuId.alarms}, {id: MenuId.dashboards}, - {id: MenuId.ai_models}, { id: MenuId.entities, pages: [ @@ -853,6 +852,7 @@ const defaultUserMenuMap = new Map([ {id: MenuId.notification_rules} ] }, + {id: MenuId.ai_models}, { id: MenuId.mobile_center, pages: [ diff --git a/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.html b/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.html index 9eac573e8a..d5d64ad0d4 100644 --- a/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.html +++ b/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.html @@ -38,35 +38,39 @@
- + {{'rule-node-config.ai.prompt-settings' | translate}} -
- - rule-node-config.ai.system-prompt - - - {{ 'rule-node-config.ai.system-prompt-max-length' | translate }} - - - {{ 'rule-node-config.ai.system-prompt-blank' | translate }} - - - - rule-node-config.ai.user-prompt - - - {{ 'rule-node-config.ai.user-prompt-required' | translate }} - - - {{ 'rule-node-config.ai.user-prompt-max-length' | translate }} - - - {{ 'rule-node-config.ai.user-prompt-blank' | translate }} - - -
+
+ + + + rule-node-config.ai.system-prompt + + + {{ 'rule-node-config.ai.system-prompt-max-length' | translate }} + + + {{ 'rule-node-config.ai.system-prompt-blank' | translate }} + + + + rule-node-config.ai.user-prompt + + + {{ 'rule-node-config.ai.user-prompt-required' | translate }} + + + {{ 'rule-node-config.ai.user-prompt-max-length' | translate }} + + + {{ 'rule-node-config.ai.user-prompt-blank' | translate }} + + +
@@ -96,7 +100,7 @@ rule-node-config.ai.advanced-settings -
+
{{ 'rule-node-config.ai.timeout' | translate }}
@@ -112,6 +116,12 @@
+
+ + {{ 'rule-node-config.ai.force-acknowledgement' | translate }} + +
diff --git a/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.ts b/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.ts index 3c9d8bf919..726d21979a 100644 --- a/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.ts +++ b/ui-ngx/src/app/modules/home/components/rule-node/external/ai-config.component.ts @@ -54,7 +54,8 @@ export class AiConfigComponent extends RuleNodeConfigurationComponent { type: [configuration?.responseFormat?.type ?? ResponseFormat.JSON, []], schema: [configuration?.responseFormat?.schema ?? null, [Validators.required]], }), - timeoutSeconds: [configuration?.timeoutSeconds ?? 60, []] + timeoutSeconds: [configuration?.timeoutSeconds ?? 60, []], + forceAck: [configuration?.forceAck ?? true, []] }); } diff --git a/ui-ngx/src/assets/help/en_US/rulenode/ai_node_prompt_settings.md b/ui-ngx/src/assets/help/en_US/rulenode/ai_node_prompt_settings.md new file mode 100644 index 0000000000..5cf8f62d58 --- /dev/null +++ b/ui-ngx/src/assets/help/en_US/rulenode/ai_node_prompt_settings.md @@ -0,0 +1 @@ +### Prompt settings diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index 837bfe4c47..3dd6d5a98d 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -5453,7 +5453,9 @@ "timeout": "Timeout", "timeout-hint": "Maximum time to wait for a response \nfrom the AI model before the request is terminated.", "timeout-required": "Timeout is required", - "timeout-validation": "Must be from 1 second to 10 minutes." + "timeout-validation": "Must be from 1 second to 10 minutes.", + "force-acknowledgement": "Force acknowledgement", + "force-acknowledgement-hint": "Force acknowledgement" } }, "timezone": {