Interface AssetTracker

  • All Implemented Interfaces:
    com.embabel.chat.AssetView

    
    public interface AssetTracker
     implements AssetView
                        

    Extended by anything that can track assets

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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, 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 wrap
        filter - Predicate - only assets passing this filter are tracked
      • 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 wrap
        filter - Predicate - only assets passing this filter are tracked