Asset Adding Tool
class AssetAddingTool<T>(val delegate: Tool, val assetTracker: AssetTracker, val converter: (T) -> Asset, val clazz: Class<T>) : DelegatingTool
Add the result of calling this tool as an asset to the given AssetTracker if it is of the expected type. Also unwraps Iterables of the expected type.
Parameters
T
The type of artifact to convert to an Asset
delegate
The tool to delegate to
asset Tracker
The asset tracker to add assets to
converter
Function to convert from T to Asset
clazz
The class of T
Properties
Functions
Link copied to clipboard
Execute the tool with JSON input.
Link copied to clipboard
Extension function to convert an Embabel Tool to a Spring AI ToolCallback.
Link copied to clipboard
Unwrap a tool to find the innermost implementation. Recursively unwraps DelegatingTool wrappers.
Link copied to clipboard
fun Tool.withEventPublication(agentProcess: AgentProcess, action: Action?, llmOptions: <Error class: unknown class>): Tool
Extension function to wrap a Tool with event publication.