From f0f3a5b678bfa48a31a96b064bf24324e9bab3ad Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 12 Apr 2024 16:02:45 +0800 Subject: [PATCH] fix failure IT Signed-off-by: zane-neo --- .../opensearch/ml/engine/algorithms/remote/ConnectorUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/ConnectorUtils.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/ConnectorUtils.java index a745f62fcf..4cfd6c6607 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/ConnectorUtils.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/ConnectorUtils.java @@ -192,7 +192,7 @@ public static ModelTensors processOutput( if (modelResponse == null) { throw new IllegalArgumentException("model response is null"); } - if (mlGuard != null && mlGuard.validate(modelResponse, MLGuard.Type.OUTPUT)) { + if (mlGuard != null && !mlGuard.validate(modelResponse, MLGuard.Type.OUTPUT)) { throw new IllegalArgumentException("guardrails triggered for LLM output"); } List modelTensors = new ArrayList<>();