Interface FunctionTools


public interface FunctionTools
Service-provider interface (SPI) for installing host-provided function tools into a Genai.

Implementations contribute one or more named tools via Genai.addTool(String, String, org.machanism.machai.ai.provider.Genai.ToolFunction, String...). Tools are typically discovered via ServiceLoader and applied at runtime.

Implementations may optionally accept a Configurator via setConfigurator(Configurator) to resolve runtime configuration (for example, API tokens for web calls).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyTools(Genai provider)
    Registers this tool set with the given provider.
    default void
    Provides a configurator instance to the tool set.
  • Method Details

    • applyTools

      void applyTools(Genai provider)
      Registers this tool set with the given provider.
      Parameters:
      provider - provider to register tools with
    • setConfigurator

      default void setConfigurator(Configurator configurator)
      Provides a configurator instance to the tool set.

      The default implementation does nothing.

      Parameters:
      configurator - configurator to use for runtime value resolution