From e4fb376ef9832d6d28df8d1a402ffb1f8f72afc4 Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Wed, 29 Nov 2023 19:10:00 -0800 Subject: [PATCH] Added TODO Signed-off-by: Owais Kazi --- .../flowframework/util/ParseUtils.java | 1 + .../workflow/RegisterAgentStep.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/opensearch/flowframework/util/ParseUtils.java b/src/main/java/org/opensearch/flowframework/util/ParseUtils.java index 02e30097b..14d113e34 100644 --- a/src/main/java/org/opensearch/flowframework/util/ParseUtils.java +++ b/src/main/java/org/opensearch/flowframework/util/ParseUtils.java @@ -117,6 +117,7 @@ public static Map parseStringToStringMap(XContentParser parser) return map; } + // TODO Figure out a way to use the parse method of LLMSpec of ml-commons /** * Parses an XContent object representing the object of LLMSpec * @param parser An XContent parser whose position is at the start of the map object to parse diff --git a/src/main/java/org/opensearch/flowframework/workflow/RegisterAgentStep.java b/src/main/java/org/opensearch/flowframework/workflow/RegisterAgentStep.java index fa570c7be..44270d8e6 100644 --- a/src/main/java/org/opensearch/flowframework/workflow/RegisterAgentStep.java +++ b/src/main/java/org/opensearch/flowframework/workflow/RegisterAgentStep.java @@ -69,10 +69,10 @@ public RegisterAgentStep(MachineLearningNodeClient mlClient) { @Override public CompletableFuture execute( - String currentNodeId, - WorkflowData currentNodeInputs, - Map outputs, - Map previousNodeInputs + String currentNodeId, + WorkflowData currentNodeInputs, + Map outputs, + Map previousNodeInputs ) throws IOException { CompletableFuture registerAgentModelFuture = new CompletableFuture<>(); @@ -82,11 +82,11 @@ public CompletableFuture execute( public void onResponse(MLRegisterAgentResponse mlRegisterAgentResponse) { logger.info("Remote Agent registration successful"); registerAgentModelFuture.complete( - new WorkflowData( - Map.ofEntries(Map.entry(AGENT_ID, mlRegisterAgentResponse.getAgentId())), - currentNodeInputs.getWorkflowId(), - currentNodeInputs.getNodeId() - ) + new WorkflowData( + Map.ofEntries(Map.entry(AGENT_ID, mlRegisterAgentResponse.getAgentId())), + currentNodeInputs.getWorkflowId(), + currentNodeInputs.getNodeId() + ) ); }