Package com.embabel.chat
Interface AssetTracker
-
- All Implemented Interfaces:
-
com.embabel.chat.AssetView
public interface AssetTracker implements AssetView
Extended by anything that can track assets
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAssetTracker.Companion
-
Method Summary
Modifier and Type Method Description abstract UnitaddAsset(Asset asset)Add an asset to be tracked. TooladdReturnedAssets(Tool tool)Wrap a tool so any outputs are tracked as assets. TooladdReturnedAssets(Tool tool, Predicate<Asset> filter)Wrap a tool so any outputs are tracked as assets, with a filter (Java-friendly). List<Tool>addAnyReturnedAssets(List<Tool> tools)Make these tools track any assets produced. List<Tool>addAnyReturnedAssets(List<Tool> tools, Predicate<Asset> filter)Make these tools track any assets produced, with a filter. -
-
Method Detail
-
addAsset
abstract Unit addAsset(Asset asset)
Add an asset to be tracked. If the asset is already being tracked, do nothing.
-
addReturnedAssets
Tool addReturnedAssets(Tool tool)
Wrap a tool so any outputs are tracked as assets.
-
addReturnedAssets
Tool addReturnedAssets(Tool tool, Predicate<Asset> filter)
Wrap a tool so any outputs are tracked as assets, with a filter (Java-friendly). Only assets that pass the filter will be tracked.
- Parameters:
tool- The tool to wrapfilter- Predicate - only assets passing this filter are tracked
-
addAnyReturnedAssets
List<Tool> addAnyReturnedAssets(List<Tool> tools)
Make these tools track any assets produced.
-
addAnyReturnedAssets
List<Tool> addAnyReturnedAssets(List<Tool> tools, Predicate<Asset> filter)
Make these tools track any assets produced, with a filter. Only assets that pass the filter will be tracked.
- Parameters:
tools- The tools to wrapfilter- Predicate - only assets passing this filter are tracked
-
-
-
-