Package com.embabel.agent.tools.math
Class MathTools
-
- All Implemented Interfaces:
-
com.embabel.agent.api.common.support.SelfToolCallbackPublisher,com.embabel.agent.api.common.support.SelfToolGroup,com.embabel.agent.core.ToolCallbackPublisher,com.embabel.agent.core.ToolCallbackSpec,com.embabel.agent.core.ToolGroup,com.embabel.common.core.types.AssetCoordinates,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named
public final class MathTools implements SelfToolGroup
-
-
Field Summary
Fields Modifier and Type Field Description private final ToolGroupDescriptiondescriptionprivate final Stringproviderprivate final Semverversionprivate final Set<ToolGroupPermission>permissionsprivate final Stringnameprivate final ToolGroupMetadatametadataprivate final List<ToolCallback>toolCallbacks
-
Constructor Summary
Constructors Constructor Description MathTools()
-
Method Summary
Modifier and Type Method Description ToolGroupDescriptiongetDescription()StringgetProvider()SemvergetVersion()Set<ToolGroupPermission>getPermissions()final Doubleadd(Double a, Double b)final Doublesubtract(Double a, Double b)final Doublemultiply(Double a, Double b)final Stringdivide(Double a, Double b)final Doublemean(List<Double> numbers)final Doublemin(List<Double> numbers)final Doublemax(List<Double> numbers)final Doublefloor(Double number)final Doubleceiling(Double number)final Doubleround(Double number)-
Methods inherited from class com.embabel.agent.api.common.support.SelfToolGroup
getMetadata, getName -
Methods inherited from class com.embabel.agent.api.common.support.SelfToolCallbackPublisher
getToolCallbacks -
Methods inherited from class com.embabel.agent.core.ToolGroup
infoString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getDescription
ToolGroupDescription getDescription()
-
getProvider
String getProvider()
-
getVersion
Semver getVersion()
-
getPermissions
Set<ToolGroupPermission> getPermissions()
-
subtract
@Tool(description = "subtract the second number from the first") final Double subtract(Double a, Double b)
-
divide
@Tool(description = "divide the first number by the second") final String divide(Double a, Double b)
-
mean
@Tool(description = "find the mean of this list of numbers") final Double mean(List<Double> numbers)
-
min
@Tool(description = "find the minimum value in a list of numbers") final Double min(List<Double> numbers)
-
max
@Tool(description = "find the maximum value in a list of numbers") final Double max(List<Double> numbers)
-
-
-
-