Package com.embabel.agent.spi.loop
Class ToolInjectionResult
-
- All Implemented Interfaces:
public final class ToolInjectionResultResult of tool injection evaluation.
Supports both adding new tools and removing existing ones, enabling patterns like MatryoshkaTool where a facade tool is replaced by its inner tools.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<Tool>toolsToAddprivate final List<Tool>toolsToRemove
-
Constructor Summary
Constructors Constructor Description ToolInjectionResult(List<Tool> toolsToAdd, List<Tool> toolsToRemove)
-
Method Summary
Modifier and Type Method Description final List<Tool>getToolsToAdd()final List<Tool>getToolsToRemove()final BooleanhasChanges()Whether this result represents any changes. final static ToolInjectionResultnoChange()No tools to add or remove. final static ToolInjectionResultadd(List<Tool> tools)Add tools without removing any. final static ToolInjectionResultadd(Tool tool)Add a single tool. final static ToolInjectionResultreplace(Tool remove, List<Tool> add)Replace a tool with others (remove one, add many). final static ToolInjectionResultremove(List<Tool> tools)Remove tools without adding any. -
-
Method Detail
-
getToolsToAdd
final List<Tool> getToolsToAdd()
-
getToolsToRemove
final List<Tool> getToolsToRemove()
-
hasChanges
final Boolean hasChanges()
Whether this result represents any changes.
-
noChange
final static ToolInjectionResult noChange()
No tools to add or remove.
-
add
final static ToolInjectionResult add(List<Tool> tools)
Add tools without removing any.
-
add
final static ToolInjectionResult add(Tool tool)
Add a single tool.
-
replace
final static ToolInjectionResult replace(Tool remove, List<Tool> add)
Replace a tool with others (remove one, add many).
-
remove
final static ToolInjectionResult remove(List<Tool> tools)
Remove tools without adding any.
-
-
-
-