From 208f4ee0c0abdd85a469087a7c43165efe502612 Mon Sep 17 00:00:00 2001 From: Pavan Yekbote Date: Tue, 28 Oct 2025 01:54:30 -0700 Subject: [PATCH 1/2] feat: add verbose_filter feature and expose verbose parameter to per agent Signed-off-by: Pavan Yekbote --- .../algorithms/agent/MLChatAgentRunner.java | 59 +++++--- .../MLPlanExecuteAndReflectAgentRunner.java | 57 +++++++- .../algorithms/agent/PromptTemplate.java | 8 +- .../remote/AwsConnectorExecutor.java | 2 +- .../remote/HttpJsonConnectorExecutor.java | 2 +- .../agent/MLChatAgentRunnerTest.java | 92 +++++++++++++ ...LPlanExecuteAndReflectAgentRunnerTest.java | 128 ++++++++++++++++++ 7 files changed, 316 insertions(+), 32 deletions(-) diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java index 7e1a4050bd..02ab5ea499 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunner.java @@ -122,6 +122,7 @@ public class MLChatAgentRunner implements MLAgentRunner { public static final String INJECT_DATETIME_FIELD = "inject_datetime"; public static final String DATETIME_FORMAT_FIELD = "datetime_format"; public static final String SYSTEM_PROMPT_FIELD = "system_prompt"; + public static final String VERBOSE_FILTER = "verbose_filter"; private static final String DEFAULT_MAX_ITERATIONS = "10"; private static final String MAX_ITERATIONS_MESSAGE = "Agent reached maximum iterations (%d) without completing the task"; @@ -300,6 +301,7 @@ private void runReAct( String parentInteractionId = tmpParameters.get(MLAgentExecutor.PARENT_INTERACTION_ID); boolean verbose = Boolean.parseBoolean(tmpParameters.getOrDefault(VERBOSE, "false")); boolean traceDisabled = tmpParameters.containsKey(DISABLE_TRACE) && Boolean.parseBoolean(tmpParameters.get(DISABLE_TRACE)); + List traceFilter = parseTraceFilter(tmpParameters.get(VERBOSE_FILTER)); // Create root interaction. ConversationIndexMemory conversationIndexMemory = (ConversationIndexMemory) memory; @@ -379,13 +381,15 @@ private void runReAct( lastActionInput.set(actionInput); lastToolSelectionResponse.set(thoughtResponse); - traceTensors - .add( - ModelTensors - .builder() - .mlModelTensors(List.of(ModelTensor.builder().name("response").result(thoughtResponse).build())) - .build() - ); + if (shouldIncludeInTrace("LLM", traceFilter)) { + traceTensors + .add( + ModelTensors + .builder() + .mlModelTensors(List.of(ModelTensor.builder().name("response").result(thoughtResponse).build())) + .build() + ); + } saveTraceData( conversationIndexMemory, @@ -487,18 +491,20 @@ private void runReAct( sessionMsgAnswerBuilder.append(outputToOutputString(filteredOutput)); streamingWrapper.sendToolResponse(outputToOutputString(output), sessionId, parentInteractionId); - traceTensors - .add( - ModelTensors - .builder() - .mlModelTensors( - Collections - .singletonList( - ModelTensor.builder().name("response").result(sessionMsgAnswerBuilder.toString()).build() - ) - ) - .build() - ); + if (shouldIncludeInTrace(lastAction.get(), traceFilter)) { + traceTensors + .add( + ModelTensors + .builder() + .mlModelTensors( + Collections + .singletonList( + ModelTensor.builder().name("response").result(sessionMsgAnswerBuilder.toString()).build() + ) + ) + .build() + ); + } if (finalI == maxIterations - 1) { handleMaxIterationsReached( @@ -842,6 +848,21 @@ static Map constructLLMParams(LLMSpec llm, Map p return tmpParameters; } + private static List parseTraceFilter(String traceFilterParam) { + if (traceFilterParam == null || traceFilterParam.trim().isEmpty()) { + return null; + } + return List.of(traceFilterParam.split(",")); + } + + private static boolean shouldIncludeInTrace(String toolName, List traceFilter) { + if (traceFilter == null) { + return true; + } + + return traceFilter.contains(toolName); + } + public static void returnFinalResponse( String sessionId, ActionListener listener, diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunner.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunner.java index b8b89d8aa2..e919ad95fa 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunner.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunner.java @@ -154,6 +154,9 @@ public class MLPlanExecuteAndReflectAgentRunner implements MLAgentRunner { public static final String INJECT_DATETIME_FIELD = "inject_datetime"; public static final String DATETIME_FORMAT_FIELD = "datetime_format"; + public static final String EXECUTOR_VERBOSE = "executor_verbose"; + public static final String EXECUTOR_VERBOSE_FILTER = "executor_verbose_filter"; + public MLPlanExecuteAndReflectAgentRunner( Client client, Settings settings, @@ -435,6 +438,15 @@ private void executePlanningLoop( allParams.getOrDefault(EXECUTOR_MESSAGE_HISTORY_LIMIT, DEFAULT_EXECUTOR_MESSAGE_HISTORY_LIMIT) ); + // Pass through verbose and verbose_filter if provided + if (allParams.containsKey(EXECUTOR_VERBOSE)) { + reactParams.put(AgentUtils.VERBOSE, allParams.get(EXECUTOR_VERBOSE)); + } + + if (allParams.containsKey(EXECUTOR_VERBOSE_FILTER)) { + reactParams.put(MLChatAgentRunner.VERBOSE_FILTER, allParams.get(EXECUTOR_VERBOSE_FILTER)); + } + AgentMLInput agentInput = AgentMLInput .AgentMLInputBuilder() .agentId(reActAgentId) @@ -449,8 +461,9 @@ private void executePlanningLoop( // Navigate through the structure to get the response Map results = new HashMap<>(); + List allResponses = new ArrayList<>(); - // Process tensors in a single stream + // Process tensors to collect all responses reactResult.getMlModelOutputs().stream().flatMap(output -> output.getMlModelTensors().stream()).forEach(tensor -> { switch (tensor.getName()) { case MEMORY_ID_FIELD: @@ -459,14 +472,35 @@ private void executePlanningLoop( case PARENT_INTERACTION_ID_FIELD: results.put(PARENT_INTERACTION_ID_FIELD, tensor.getResult()); break; - default: - Map dataMap = tensor.getDataAsMap(); - if (dataMap != null && dataMap.containsKey(RESPONSE_FIELD)) { - results.put(STEP_RESULT_FIELD, (String) dataMap.get(RESPONSE_FIELD)); + case RESPONSE_FIELD: + if (tensor.getResult() != null) { + allResponses.add(tensor.getResult()); + } else { + Map dataMap = tensor.getDataAsMap(); + if (dataMap != null && dataMap.containsKey(RESPONSE_FIELD)) { + allResponses.add((String) dataMap.get(RESPONSE_FIELD)); + } } } }); + if (!allResponses.isEmpty()) { + StringBuilder stepResult = new StringBuilder(); + stepResult.append(allResponses.getLast()); + if (allResponses.size() > 1) { + stepResult.append("\n\n"); + } + + for (int i = 0; i < allResponses.size() - 1; i++) { + stepResult.append("\n\n").append(allResponses.get(i)); + if (i == allResponses.size() - 2) { + stepResult.append("\n"); + } + } + + results.put(STEP_RESULT_FIELD, stepResult.toString()); + } + if (!results.containsKey(STEP_RESULT_FIELD)) { throw new IllegalStateException("No valid response found in ReAct agent output"); } @@ -502,8 +536,17 @@ private void executePlanningLoop( }, e -> log.error("Failed to update task {} with executor memory ID", taskId, e))); } - completedSteps.add(String.format("\nStep %d: %s\n", stepsExecuted + 1, stepToExecute)); - completedSteps.add(String.format("\nStep %d Result: %s\n", stepsExecuted + 1, results.get(STEP_RESULT_FIELD))); + completedSteps.add(String.format("\n\n%s\n\n", stepsExecuted + 1, stepToExecute, stepsExecuted + 1)); + completedSteps + .add( + String + .format( + "\n\n%s\n\n", + stepsExecuted + 1, + results.get(STEP_RESULT_FIELD), + stepsExecuted + 1 + ) + ); saveTraceData( (ConversationIndexMemory) memory, diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/PromptTemplate.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/PromptTemplate.java index 67b29c3557..9ff33ecaa9 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/PromptTemplate.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/agent/PromptTemplate.java @@ -28,9 +28,9 @@ public class PromptTemplate { + "${parameters." + PLANNER_PROMPT_FIELD + "} \n" - + "Objective: ${parameters." + + "Objective: ```${parameters." + USER_PROMPT_FIELD - + "} \n\nRemember: Respond only in JSON format following the required schema."; + + "}``` \n\nRemember: Respond only in JSON format following the required schema."; public static final String DEFAULT_REFLECT_PROMPT_TEMPLATE = "${parameters." + DEFAULT_PROMPT_TOOLS_FIELD @@ -41,10 +41,10 @@ public class PromptTemplate { + "Objective: ```${parameters." + USER_PROMPT_FIELD + "}```\n\n" - + "Original plan:\n[${parameters." + + "Previous plan:\n[${parameters." + STEPS_FIELD + "}] \n\n" - + "You have currently executed the following steps from the original plan: \n[${parameters." + + "You have currently executed the following steps: \n[${parameters." + COMPLETED_STEPS_FIELD + "}] \n\n" + "${parameters." diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java index 3b53935aaf..171667ce55 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java @@ -106,7 +106,7 @@ public void invokeRemoteService( SdkHttpFullRequest request; switch (connector.getActionHttpMethod(action).toUpperCase(Locale.ROOT)) { case "POST": - log.debug("original payload to remote model: " + payload); + log.info("\n\n\noriginal payload to remote model: " + payload); request = ConnectorUtils.buildSdkRequest(action, connector, parameters, payload, POST); break; case "GET": diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java index 7804770258..08d5e73b02 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java @@ -105,7 +105,7 @@ public void invokeRemoteService( SdkHttpFullRequest request; switch (connector.getActionHttpMethod(action).toUpperCase(Locale.ROOT)) { case "POST": - log.debug("original payload to remote model: " + payload); + log.info("\n\n\noriginal payload to remote model: " + payload); request = ConnectorUtils.buildSdkRequest(action, connector, parameters, payload, POST); break; case "GET": diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunnerTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunnerTest.java index f6c3e3618e..037d9f2f3c 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunnerTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLChatAgentRunnerTest.java @@ -1171,4 +1171,96 @@ public void testConstructLLMParams_DefaultValues() { Assert.assertTrue(result.containsKey(AgentUtils.RESPONSE_FORMAT_INSTRUCTION)); Assert.assertTrue(result.containsKey(AgentUtils.TOOL_RESPONSE)); } + + @Test + public void testVerboseFilterWithSpecificFields() { + // Create an MLAgent and run with verbose_filter + MLAgent mlAgent = createMLAgentWithTools(); + Map params = new HashMap<>(); + params.put(MLAgentExecutor.PARENT_INTERACTION_ID, "parent_interaction_id"); + params.put("verbose", "true"); + params.put("verbose_filter", "firstTool"); + + mlChatAgentRunner.run(mlAgent, params, agentActionListener, null); + + // Capture the response + ArgumentCaptor responseCaptor = ArgumentCaptor.forClass(Object.class); + verify(agentActionListener).onResponse(responseCaptor.capture()); + + Object capturedResponse = responseCaptor.getValue(); + assertTrue(capturedResponse instanceof ModelTensorOutput); + ModelTensorOutput modelTensorOutput = (ModelTensorOutput) capturedResponse; + + // Count response fields across all outputs + int responseFieldCount = 0; + for (ModelTensors output : modelTensorOutput.getMlModelOutputs()) { + for (ModelTensor tensor : output.getMlModelTensors()) { + if ("response".equals(tensor.getName())) { + responseFieldCount++; + } + } + } + + // Verify there is more than one response field + assertEquals(2, responseFieldCount); + } + + @Test + public void testVerboseFilterWithInvalidPath() { + // Create an MLAgent and run with invalid verbose_filter + MLAgent mlAgent = createMLAgentWithTools(); + Map params = new HashMap<>(); + params.put(MLAgentExecutor.PARENT_INTERACTION_ID, "parent_interaction_id"); + params.put("verbose", "true"); + params.put("verbose_filter", "RandomTool"); + + mlChatAgentRunner.run(mlAgent, params, agentActionListener, null); + + // Should still work but filter nothing + ArgumentCaptor responseCaptor = ArgumentCaptor.forClass(Object.class); + verify(agentActionListener).onResponse(responseCaptor.capture()); + + Object capturedResponse = responseCaptor.getValue(); + assertTrue(capturedResponse instanceof ModelTensorOutput); + ModelTensorOutput modelTensorOutput = (ModelTensorOutput) capturedResponse; + int responseFieldCount = 0; + for (ModelTensors output : modelTensorOutput.getMlModelOutputs()) { + for (ModelTensor tensor : output.getMlModelTensors()) { + if ("response".equals(tensor.getName())) { + responseFieldCount++; + } + } + } + + assertEquals(1, responseFieldCount); + } + + @Test + public void testVerboseFilterWithoutVerbose() { + // Create an MLAgent and run with verbose_filter but verbose=false + MLAgent mlAgent = createMLAgentWithTools(); + Map params = new HashMap<>(); + params.put(MLAgentExecutor.PARENT_INTERACTION_ID, "parent_interaction_id"); + params.put("verbose", "false"); + + mlChatAgentRunner.run(mlAgent, params, agentActionListener, null); + + // verbose_filter should be ignored when verbose=false + ArgumentCaptor responseCaptor = ArgumentCaptor.forClass(Object.class); + verify(agentActionListener).onResponse(responseCaptor.capture()); + + Object capturedResponse = responseCaptor.getValue(); + assertTrue(capturedResponse instanceof ModelTensorOutput); + ModelTensorOutput modelTensorOutput = (ModelTensorOutput) capturedResponse; + int responseFieldCount = 0; + for (ModelTensors output : modelTensorOutput.getMlModelOutputs()) { + for (ModelTensor tensor : output.getMlModelTensors()) { + if ("response".equals(tensor.getName())) { + responseFieldCount++; + } + } + } + + assertEquals(1, responseFieldCount); + } } diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunnerTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunnerTest.java index 5245ccc320..f00b21ef7a 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunnerTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunnerTest.java @@ -765,4 +765,132 @@ public void testUpdateTaskWithExecutorAgentInfo() { mlTaskUtilsMockedStatic.verify(() -> MLTaskUtils.updateMLTaskDirectly(eq(taskId), eq(taskUpdates), eq(client), any())); } } + + @Test + public void testExecutorVerboseParameters() { + MLAgent mlAgent = createMLAgentWithTools(); + AtomicInteger callCount = new AtomicInteger(0); + + doAnswer(invocation -> { + ActionListener listener = invocation.getArgument(2); + ModelTensor modelTensor; + if (callCount.getAndIncrement() == 0) { + modelTensor = ModelTensor + .builder() + .dataAsMap(ImmutableMap.of("response", "{\"steps\":[\"step1\"], \"result\":\"\"}")) + .build(); + } else { + modelTensor = ModelTensor + .builder() + .dataAsMap(ImmutableMap.of("response", "{\"steps\":[\"step1\"], \"result\":\"final result\"}")) + .build(); + } + ModelTensors modelTensors = ModelTensors.builder().mlModelTensors(Arrays.asList(modelTensor)).build(); + ModelTensorOutput mlModelTensorOutput = ModelTensorOutput.builder().mlModelOutputs(Arrays.asList(modelTensors)).build(); + when(mlTaskResponse.getOutput()).thenReturn(mlModelTensorOutput); + listener.onResponse(mlTaskResponse); + return null; + }).when(client).execute(eq(MLPredictionTaskAction.INSTANCE), any(MLPredictionTaskRequest.class), any()); + + doAnswer(invocation -> { + ActionListener listener = invocation.getArgument(2); + ModelTensor responseTensor = ModelTensor + .builder() + .name("response") + .dataAsMap(ImmutableMap.of("response", "tool execution result")) + .build(); + ModelTensors modelTensors = ModelTensors.builder().mlModelTensors(Arrays.asList(responseTensor)).build(); + ModelTensorOutput mlModelTensorOutput = ModelTensorOutput.builder().mlModelOutputs(Arrays.asList(modelTensors)).build(); + when(mlExecuteTaskResponse.getOutput()).thenReturn(mlModelTensorOutput); + listener.onResponse(mlExecuteTaskResponse); + return null; + }).when(client).execute(eq(MLExecuteTaskAction.INSTANCE), any(MLExecuteTaskRequest.class), any()); + + doAnswer(invocation -> { + ActionListener listener = invocation.getArgument(2); + listener.onResponse(updateResponse); + return null; + }).when(mlMemoryManager).updateInteraction(any(), any(), any()); + + Map params = new HashMap<>(); + params.put("question", "test question"); + params.put("parent_interaction_id", "test_parent_interaction_id"); + params.put("executor_verbose", "true"); + params.put("executor_verbose_filter", "firstTool"); + + mlPlanExecuteAndReflectAgentRunner.run(mlAgent, params, agentActionListener); + + ArgumentCaptor executeCaptor = ArgumentCaptor.forClass(MLExecuteTaskRequest.class); + verify(client).execute(eq(MLExecuteTaskAction.INSTANCE), executeCaptor.capture(), any()); + + AgentMLInput agentInput = (AgentMLInput) executeCaptor.getValue().getInput(); + RemoteInferenceInputDataSet dataset = (RemoteInferenceInputDataSet) agentInput.getInputDataset(); + Map executorParams = dataset.getParameters(); + + assertEquals("true", executorParams.get("verbose")); + assertEquals("firstTool", executorParams.get("verbose_filter")); + } + + @Test + public void testExecutorVerboseWithMultipleResponses() { + MLAgent mlAgent = createMLAgentWithTools(); + + doAnswer(invocation -> { + ActionListener listener = invocation.getArgument(2); + ModelTensor modelTensor = ModelTensor + .builder() + .dataAsMap(ImmutableMap.of("response", "{\"steps\":[\"step1\"], \"result\":\"\"}")) + .build(); + ModelTensors modelTensors = ModelTensors.builder().mlModelTensors(Arrays.asList(modelTensor)).build(); + ModelTensorOutput mlModelTensorOutput = ModelTensorOutput.builder().mlModelOutputs(Arrays.asList(modelTensors)).build(); + when(mlTaskResponse.getOutput()).thenReturn(mlModelTensorOutput); + listener.onResponse(mlTaskResponse); + return null; + }).when(client).execute(eq(MLPredictionTaskAction.INSTANCE), any(MLPredictionTaskRequest.class), any()); + + doAnswer(invocation -> { + ActionListener listener = invocation.getArgument(2); + ModelTensor response1 = ModelTensor.builder().name("response").result("First tool response").build(); + ModelTensor response2 = ModelTensor.builder().name("response").result("Second tool response").build(); + ModelTensors tensors1 = ModelTensors.builder().mlModelTensors(Arrays.asList(response1)).build(); + ModelTensors tensors2 = ModelTensors.builder().mlModelTensors(Arrays.asList(response2)).build(); + ModelTensorOutput mlModelTensorOutput = ModelTensorOutput.builder().mlModelOutputs(Arrays.asList(tensors1, tensors2)).build(); + when(mlExecuteTaskResponse.getOutput()).thenReturn(mlModelTensorOutput); + listener.onResponse(mlExecuteTaskResponse); + return null; + }).when(client).execute(eq(MLExecuteTaskAction.INSTANCE), any(MLExecuteTaskRequest.class), any()); + + doAnswer(invocation -> { + ActionListener listener = invocation.getArgument(2); + listener.onResponse(updateResponse); + return null; + }).when(mlMemoryManager).updateInteraction(any(), any(), any()); + + Map params = new HashMap<>(); + params.put("question", "test question"); + params.put("parent_interaction_id", "test_parent_interaction_id"); + params.put("executor_verbose", "true"); + + mlPlanExecuteAndReflectAgentRunner.run(mlAgent, params, agentActionListener); + + verify(agentActionListener).onResponse(objectCaptor.capture()); + Object response = objectCaptor.getValue(); + assertTrue(response instanceof ModelTensorOutput); + ModelTensorOutput modelTensorOutput = (ModelTensorOutput) response; + + List mlModelOutputs = modelTensorOutput.getMlModelOutputs(); + assertEquals(2, mlModelOutputs.size()); + + ModelTensors secondModelTensors = mlModelOutputs.get(1); + List secondModelTensorList = secondModelTensors.getMlModelTensors(); + assertEquals(1, secondModelTensorList.size()); + + ModelTensor responseTensor = secondModelTensorList.get(0); + assertEquals("response", responseTensor.getName()); + + String stepResult = (String) responseTensor.getDataAsMap().get("response"); + assertTrue(stepResult.contains("Second tool response")); + assertTrue(stepResult.contains("")); + assertTrue(stepResult.contains("First tool response")); + } } From ce553e4a611b7ba5a6c11d4fde2fe5efe741f0f4 Mon Sep 17 00:00:00 2001 From: Pavan Yekbote Date: Tue, 28 Oct 2025 02:07:27 -0700 Subject: [PATCH 2/2] remove test changes Signed-off-by: Pavan Yekbote --- .../ml/engine/algorithms/remote/AwsConnectorExecutor.java | 2 +- .../ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java index 171667ce55..79ae778bfa 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/AwsConnectorExecutor.java @@ -106,7 +106,7 @@ public void invokeRemoteService( SdkHttpFullRequest request; switch (connector.getActionHttpMethod(action).toUpperCase(Locale.ROOT)) { case "POST": - log.info("\n\n\noriginal payload to remote model: " + payload); + log.debug("\n\n\noriginal payload to remote model: " + payload); request = ConnectorUtils.buildSdkRequest(action, connector, parameters, payload, POST); break; case "GET": diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java index 08d5e73b02..aefd65d5e0 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutor.java @@ -105,7 +105,7 @@ public void invokeRemoteService( SdkHttpFullRequest request; switch (connector.getActionHttpMethod(action).toUpperCase(Locale.ROOT)) { case "POST": - log.info("\n\n\noriginal payload to remote model: " + payload); + log.debug("\n\n\noriginal payload to remote model: " + payload); request = ConnectorUtils.buildSdkRequest(action, connector, parameters, payload, POST); break; case "GET":