LlmEx.ToolHandler (LlmEx v0.1.0)
View SourceShared functionality for handling tools across different LLM clients. Provides common methods for executing tool calls, parsing arguments, and processing results.
Summary
Functions
Execute a tool call and return the result.
Parse tool arguments from various formats into a map.
Process various tool result formats into a standardized format.
Functions
Execute a tool call and return the result.
Parameters
tool_name
- Name of the tool to executeargs
- Arguments to pass to the toolopts
- Additional options
Returns
- Map containing either a result or an error
Parse tool arguments from various formats into a map.
Parameters
args
- Arguments to parse (string, map, or other)
Returns
- Map of parsed arguments
Process various tool result formats into a standardized format.
Returns
- Map with either a "result" or "error" key