Skip to content

Commit

Permalink
[BugFix] Avoid overriding the input parameter of the following tools …
Browse files Browse the repository at this point in the history
…in flow agent.

Signed-off-by: Heng Qian <[email protected]>
  • Loading branch information
qianheng-aws committed Aug 20, 2024
1 parent b51f47f commit 2f1f610
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ Map<String, String> getToolExecuteParams(MLToolSpec toolSpec, Map<String, String
StringSubstitutor substitutor = new StringSubstitutor(executeParams, "${parameters.", "}");
input = substitutor.replace(input);
executeParams.put("input", input);
// Remove the current input from params to avoid passing it to the following tools.
// Otherwise, it will override the default input of the following tools.
params.remove("input");
}
return executeParams;
}
Expand Down

0 comments on commit 2f1f610

Please sign in to comment.