-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add previous key for PPL tool #131
Conversation
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #131 +/- ##
============================================
+ Coverage 81.75% 81.76% +0.01%
- Complexity 197 201 +4
============================================
Files 13 13
Lines 1003 1042 +39
Branches 132 139 +7
============================================
+ Hits 820 852 +32
- Misses 133 136 +3
- Partials 50 54 +4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: xinyual <xinyual@amazon.com>
if (parameters.containsKey("index")) { | ||
indexName = parameters.get("index"); | ||
} else if (!StringUtils.isBlank(this.previousToolKey) && parameters.containsKey(this.previousToolKey + ".output")) { | ||
indexName = parameters.get(this.previousToolKey + ".output"); // read index name from previous key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we handle 'Not sure' here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Once the index routing pr is merged I will check whether the index is equal to NOT_SURE and then throw an exception if it is.
This should work for PPLTool case, but I'm thinking of creating a systematically approach to deal with the tool results passing through the agent execute flow, e.g. a map contains all tool's result with iteration number. That would need bigger effort but that should be the correct direction. Please evaluate the effort and better creating a design doc to involve broader audience. |
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
@@ -213,7 +222,17 @@ public <T> void run(Map<String, String> parameters, ActionListener<T> listener) | |||
)); | |||
}, e -> { | |||
log.info("fail to get mapping: " + e); | |||
listener.onFailure(e); | |||
String error_message = e.getMessage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use camel naming convention for variables
Signed-off-by: xinyual <xinyual@amazon.com>
String indexName = ""; | ||
indexName = parameters.getOrDefault("index", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This two line can be merged together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already changed
Signed-off-by: xinyual <xinyual@amazon.com>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/skills/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/skills/backport-2.x
# Create a new branch
git switch --create backport/backport-131-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c2a1fedd0a70959c6375a30df6e823989d74c295
# Push it to GitHub
git push --set-upstream origin backport/backport-131-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/skills/backport-2.x Then, create a pull request where the |
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
* backport from opensearch-project#131 Signed-off-by: xinyual <xinyual@amazon.com> * backport from opensearch-project#131 Signed-off-by: xinyual <xinyual@amazon.com> * backport from opensearch-project#131 Signed-off-by: xinyual <xinyual@amazon.com> --------- Signed-off-by: xinyual <xinyual@amazon.com> Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Description
add previous key for PPL tool, so we can extract content from previous tool output.
request body would be like:
The previous_tool_name should be name of previous tool
Issues Resolved
add previous key for PPL tool, so we can extract content from previous tool output.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.