From e7c971a7bbb82d4d62d7db914e805a45beb03e11 Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 9 Jul 2025 20:40:14 +0300 Subject: [PATCH] AI rule node: add node description and details --- .../thingsboard/rule/engine/ai/TbAiNode.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/ai/TbAiNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/ai/TbAiNode.java index 93c2cafaae..6c4815308a 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/ai/TbAiNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/ai/TbAiNode.java @@ -52,9 +52,20 @@ import static org.thingsboard.server.dao.service.ConstraintValidator.validateFie @RuleNode( type = ComponentType.EXTERNAL, - name = "AI", - nodeDescription = "Interact with AI", - nodeDetails = "This node makes requests to AI based on a prompt and a input message and returns a response in a form of output message", + name = "AI request", + nodeDescription = "Sends a request to an AI model using system and user prompts. Supports JSON mode.", + nodeDetails = """ + Interact with large language models (LLMs) by sending dynamic requests from your rule chain. + You can select a specific AI model and define its behavior using a system prompt (optional context or role) and a user prompt (the main task). + Both prompts can be populated with data and metadata from the incoming message using patterns. + For example, the $[*] and ${*} patterns allow you to access the all message body and all metadata, respectively. +

+ After sending the request, the node waits for a response within a configured timeout. + You can specify the desired response format as Text, JSON, or provide a specific JSON Schema to structure the output. + The AI-generated content is forwarded as the body of the outgoing message; the originator, message type, and metadata from the incoming message remain unchanged. +

+ Output connections: Success, Failure. + """, configClazz = TbAiNodeConfiguration.class, ruleChainTypes = RuleChainType.CORE )