Skip to content

Commit

Permalink
trim index name in parameters for PPL tool (#185)
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws authored Feb 6, 2024
1 parent c2a1fed commit df90be3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/opensearch/agent/tools/PPLTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ private String getIndexNameFromParameters(Map<String, String> parameters) {
if (!StringUtils.isBlank(this.previousToolKey) && StringUtils.isBlank(indexName)) {
indexName = parameters.getOrDefault(this.previousToolKey + ".output", ""); // read index name from previous key
}
return indexName;

return indexName.trim();
}

private static Map<String, String> loadDefaultPromptDict() throws IOException {
Expand Down

0 comments on commit df90be3

Please sign in to comment.