Class ToolCallPostProcessor

java.lang.Object
smile.llm.tool.ToolCallPostProcessor

public final class ToolCallPostProcessor extends Object
Applies a ToolCallParser to a completed generation when options request tool-call parsing, and always sanitizes visible assistant text.
  • Method Details

    • apply

      public static ChatCompletion apply(ChatCompletion completion, ChatOptions options)
      Rewrites content / finish reason / toolCalls from the parser when tools are enabled; always strips think / tool / chat-special markup from visible content.
      Parameters:
      completion - raw generation result.
      options - chat options; may be null.
      Returns:
      possibly rewritten completion.