Interface LlmMessageSender

  • All Implemented Interfaces:

    
    public interface LlmMessageSender
    
                        

    Framework-agnostic interface for making a single LLM inference call.

    Implementations handle the actual LLM communication (Spring AI, LangChain4j, etc.) but do NOT execute tools - they just return the LLM's response including any tool call requests.

    This allows the tool loop to be framework-agnostic while delegating the actual LLM communication to framework-specific implementations.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract LlmMessageResponse call(List<Message> messages, List<Tool> tools) c Make a single LLM inference call.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • call

         abstract LlmMessageResponse call(List<Message> messages, List<Tool> tools)

        c Make a single LLM inference call.

        Parameters:
        messages - The conversation history
        tools - Available tools (for the LLM to know what's available)
        Returns:

        The assistant's response message