-
Notifications
You must be signed in to change notification settings - Fork 37
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
[Feature/agent_framework] Registers root agent with an agentId in ToolSteps #242
[Feature/agent_framework] Registers root agent with an agentId in ToolSteps #242
Conversation
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.
LGTM. Would like error messages to be more verbose but that can be handled in another PR
@@ -240,7 +231,7 @@ private String getLlmModelId(Map<String, String> previousNodeInputs, Map<String, | |||
|
|||
private LLMSpec getLLMSpec(String llmModelId, Map<String, String> llmParameters) { | |||
if (llmModelId == null) { | |||
throw new IllegalArgumentException("model id for llm is null"); | |||
throw new FlowFrameworkException("model id for llm is null", RestStatus.BAD_REQUEST); |
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.
Can we pass workflow ID and step ID to this method to include in the exception? (Can handle in a future PR)
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.
We need to do this for all the exception message for the workflow steps. I can raise a follow up PR for all of them.
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.
// Case when modelId is not present at all | ||
if (llmModelId == null) { | ||
registerAgentModelFuture.completeExceptionally( | ||
new FlowFrameworkException("llm model id is not provided", RestStatus.BAD_REQUEST) |
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 add workflowID and step (node) ID to this error message. (Can handle in a future PR)
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
cbc3661
to
9fd114a
Compare
Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
53daf61
into
opensearch-project:feature/agent_framework
…lSteps (opensearch-project#242) * Add agentId to parameters map for root agent Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Modified ToolStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Integrated RegisterAgentStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Spotless fixes Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Removed TODO Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> --------- Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
…lSteps (opensearch-project#242) * Add agentId to parameters map for root agent Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Modified ToolStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Integrated RegisterAgentStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Spotless fixes Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Removed TODO Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> --------- Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
…lSteps (#242) * Add agentId to parameters map for root agent Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Modified ToolStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Integrated RegisterAgentStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Spotless fixes Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Removed TODO Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> --------- Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
…lSteps (opensearch-project#242) * Add agentId to parameters map for root agent Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Modified ToolStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Integrated RegisterAgentStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Spotless fixes Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Removed TODO Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> --------- Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
…lSteps (#242) * Add agentId to parameters map for root agent Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Modified ToolStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Integrated RegisterAgentStep with new Util method Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Spotless fixes Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> * Removed TODO Signed-off-by: Owais Kazi <owaiskazi19@gmail.com> --------- Signed-off-by: Owais Kazi <owaiskazi19@gmail.com>
Description
This PR:
agent_id
. Ref: [FEATURE] Register Agent Workflow Step #194 (comment)TODO:#241Issues Resolved
Closes #194
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.