ManualToolCallFixProcessor
class ManualToolCallFixProcessor @JvmOverloads constructor(toolRegistry: ToolRegistry, toolCallJsonConfig: ToolCallJsonConfig = ToolCallJsonConfig()) : ToolJsonFixProcessor(source)
A response processor that fixes invalid tool call jsons. Fixes incorrectly formatted jsons, e.g.
incorrect tool id / name / arguments keys
missing escapes in strings
Parameters
toolRegistry
The tool registry with available tools
toolCallJsonConfig
Configuration for parsing and fixing tool call json
Constructors
Link copied to clipboard
constructor(toolRegistry: ToolRegistry, toolCallJsonConfig: ToolCallJsonConfig = ToolCallJsonConfig())
Functions
Link copied to clipboard
Chains two processors together.
Link copied to clipboard
open suspend override fun process(executor: PromptExecutor, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, responses: List<Message.Response>, serializer: JSONSerializer): List<Message.Response>
Processes the given LLM responses. These responses were received using executor, prompt, model, tools.
suspend fun process(executor: PromptExecutor, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, response: Message.Response, serializer: JSONSerializer): Message.Response
Processes a single LLM response.