Class SpringToolCallbackWrapper

  • All Implemented Interfaces:
    com.embabel.agent.api.tool.Tool , com.embabel.agent.api.tool.ToolInfo

    
    public final class SpringToolCallbackWrapper
     implements Tool
                        

    Wraps a Spring AI ToolCallback as an Embabel Tool.

    This reverse adapter allows existing Spring AI tools to be used within the Embabel framework.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Tool.Definition getDefinition() Tool definition for LLM
      Tool.Metadata getMetadata() Optional metadata
      Tool.Result call(String input) Execute the tool with JSON input.
      • Methods inherited from class com.embabel.agent.api.tool.Tool

        withDescription, withName, withNote
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringToolCallbackWrapper

        SpringToolCallbackWrapper(ToolCallback callback)