Interface ToolCallResultConverter

All Superinterfaces:
BiFunction<Object,Type,String>
All Known Implementing Classes:
DefaultToolCallResultConverter
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 ToolCallResultConverter extends BiFunction<Object,Type,String>
A functional interface to convert tool call results to a String that can be sent back to the AI model.
Since:
1.0.0
Author:
Thomas Vitale
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Object result, Type returnType)
    Given an Object returned by a tool, convert it to a String compatible with the given class type.

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • apply

      String apply(@Nullable Object result, @Nullable Type returnType)
      Given an Object returned by a tool, convert it to a String compatible with the given class type.
      Specified by:
      apply in interface BiFunction<Object,Type,String>