Class ToolCallPostProcessor
java.lang.Object
smile.llm.tool.ToolCallPostProcessor
Applies a
ToolCallParser to a completed generation when options
request tool-call parsing, and always sanitizes visible assistant text.-
Method Summary
Modifier and TypeMethodDescriptionstatic ChatCompletionapply(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.
-
Method Details
-
apply
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 benull.- Returns:
- possibly rewritten completion.
-