Browse Source
AI rule node: rename `aiModelId` to `modelId` in rule node config
pull/13371/head
Dmytro Skarzhynets
11 months ago
No known key found for this signature in database
GPG Key ID: 2B51652F224037DF
2 changed files with
2 additions and
2 deletions
-
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/ai/TbAiNode.java
-
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/ai/TbAiNodeConfiguration.java
|
|
|
@ -97,7 +97,7 @@ public final class TbAiNode extends TbAbstractExternalNode implements TbNode { |
|
|
|
systemPrompt = config.getSystemPrompt(); |
|
|
|
userPrompt = config.getUserPrompt(); |
|
|
|
timeoutSeconds = config.getTimeoutSeconds(); |
|
|
|
modelId = config.getAiModelId(); |
|
|
|
modelId = config.getModelId(); |
|
|
|
|
|
|
|
Optional<AiModel> model = ctx.getAiModelService().findAiModelByTenantIdAndId(ctx.getTenantId(), modelId); |
|
|
|
if (model.isEmpty()) { |
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ import static org.thingsboard.rule.engine.ai.TbResponseFormat.TbJsonResponseForm |
|
|
|
public class TbAiNodeConfiguration implements NodeConfiguration<TbAiNodeConfiguration> { |
|
|
|
|
|
|
|
@NotNull |
|
|
|
private AiModelId aiModelId; |
|
|
|
private AiModelId modelId; |
|
|
|
|
|
|
|
@Pattern(regexp = ".*\\S.*", message = "must not be blank") |
|
|
|
@Length(min = 1, max = 10000) |
|
|
|
|