Interface PrintAdvanceMessageHandler

All Known Subinterfaces:
PrintMessageHandler

public interface PrintAdvanceMessageHandler
Represents a PrintAdvanceMessageHandler. This is used by the Core to print messages for the user, LLM, Tools, or potentialy System, see OllamaMessageRole. For a simpler version see PrintMessageHandler
  • Method Details

    • printMessage

      void printMessage(OllamaMessage message)
      Expected to handle the printing of the provided OllamaMessage.
      Parameters:
      message - The OllamaMessage requested to be printed from a veriity of sources, see OllamaMessageRole
    • printErrorMessage

      void printErrorMessage(OllamaMessage errorMessage)
      Default method to print error messages to the user or API Client. This uses ANSI escape codes to color the output red if color is supported.
      Parameters:
      errorMessage - The error message to be printed. If color is not supported, it will print the message without color.