-
Notifications
You must be signed in to change notification settings - Fork 49
add helper conditional to the AgenticDSL class #811
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 helper conditional to the AgenticDSL class #811
Conversation
Signed-off-by: Dmitrii Tikhomirov <[email protected]>
|
||
public static AgentTaskConfigurer conditional(Predicate<?> predicate, Object agent) { | ||
return list -> list.agent(agent).when(predicate); | ||
} |
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.
Add a new overload conditional(predicate, agents..)
in case we can call a sequence of agents under a certain condition.
Signed-off-by: Dmitrii Tikhomirov <[email protected]>
return list -> list.agent(agent).when(predicate); | ||
} | ||
|
||
public static AgentTaskConfigurer conditionalSequence(Predicate<?> predicate, Object... agents) { |
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 can keep this as "sequence" or "conditional". Too long :)
return list -> list.sequence(agents).when(predicate); | ||
} | ||
|
||
public static AgentTaskConfigurer conditionalParallel(Predicate<?> predicate, Object... agents) { |
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.
Same thing. We can name this just parallel.
Signed-off-by: Dmitrii Tikhomirov <[email protected]>
3a51e25
to
f06ae2b
Compare
It would be nice to have AgentTaskConfigurer conditional(Predicate<?> predicate, Object agent) in the AgenticDSL