Package com.embabel.agent.api.tool
Class ToolObject
-
- All Implemented Interfaces:
public final class ToolObjectHolds one or more annotated tool objects. Adds a naming strategy and a filter to the overall object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classToolObject.Companion
-
Field Summary
Fields Modifier and Type Field Description private final List<Object>objectsprivate final StringTransformernamingStrategyprivate final Function1<String, Boolean>filterpublic final static ToolObject.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description ToolObject(Object obj, StringTransformer namingStrategy, Function1<String, Boolean> filter)ToolObject(Object obj)ToolObject(List<Object> objects, StringTransformer namingStrategy, Function1<String, Boolean> filter)
-
Method Summary
Modifier and Type Method Description final List<Object>getObjects()final StringTransformergetNamingStrategy()final Function1<String, Boolean>getFilter()final ToolObjectwithPrefix(String prefix)Add a prefix to the tool object's method names. final ToolObjectwithNamingStrategy(StringTransformer namingStrategy)Add a naming strategy to the tool object's method names. final ToolObjectwithFilter(Function1<String, Boolean> filter)-
-
Constructor Detail
-
ToolObject
ToolObject(Object obj, StringTransformer namingStrategy, Function1<String, Boolean> filter)
-
ToolObject
ToolObject(Object obj)
-
ToolObject
ToolObject(List<Object> objects, StringTransformer namingStrategy, Function1<String, Boolean> filter)
- Parameters:
objects- the objects the tool annotations are onnamingStrategy- the naming strategy to use for the tool object's methodsfilter- a filter to apply to the tool object's methods
-
-
Method Detail
-
getObjects
final List<Object> getObjects()
-
getNamingStrategy
final StringTransformer getNamingStrategy()
-
withPrefix
final ToolObject withPrefix(String prefix)
Add a prefix to the tool object's method names.
-
withNamingStrategy
final ToolObject withNamingStrategy(StringTransformer namingStrategy)
Add a naming strategy to the tool object's method names.
-
withFilter
final ToolObject withFilter(Function1<String, Boolean> filter)
-
-
-
-