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 Summary
Modifier and TypeMethodDescriptionvoidprintErrorMessage(OllamaMessage errorMessage) Default method to print error messages to the user or API Client.voidprintMessage(OllamaMessage message) Expected to handle the printing of the providedOllamaMessage.voidprintToolCalling(String representation) Used when a tool is to have it's calling rendered
-
Method Details
-
printMessage
Expected to handle the printing of the providedOllamaMessage.- Parameters:
message- TheOllamaMessagerequested to be printed from a veriity of sources, seeOllamaMessageRole
-
printErrorMessage
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.
-
printToolCalling
Used when a tool is to have it's calling rendered- Parameters:
representation- the string to be printed
-