Interface ToolFunction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ToolFunction
Functional interface representing a tool callable by a provider during a run.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Object[] params)
    Executes the tool.
  • Method Details

    • apply

      Object apply(Object[] params) throws IOException
      Executes the tool.
      Parameters:
      params - provider-specific parameters
      Returns:
      tool result (provider-specific; commonly serialized to JSON)
      Throws:
      IOException - if tool execution fails