Skip to content

Commit

Permalink
Fix parsing boolean string issue
Browse files Browse the repository at this point in the history
Signed-off-by: Songkan Tang <[email protected]>
  • Loading branch information
songkant-aws committed Aug 5, 2024
1 parent 70a5482 commit 13323fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/opensearch/agent/tools/RCATool.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public void init(Client client) {

@Override
public RCATool create(Map<String, Object> parameters) {
Boolean isLLMOption = (Boolean) parameters.get(IS_LLM_OPTION);
Boolean isLLMOption = Boolean.valueOf((String) parameters.getOrDefault(IS_LLM_OPTION, "true"));
String modelId = (String) parameters.get(MODEL_ID);
if (isLLMOption && Strings.isBlank(modelId)) {
throw new IllegalArgumentException("model_id cannot be null or blank.");
Expand Down

0 comments on commit 13323fc

Please sign in to comment.