to_model_output
Method
This is a method of the BaseTool class in the base module.Optional hook returning a compact, model-facing view of
result.
result is the tool’s raw return value (the output channel),
not the enclosing :class:ToolResult. This is the single hook contract
used everywhere: safe_run and the agent executor both invoke it with
the output value. Override to feed the LLM a terse summary/diff instead
of the full tool output for context economy; the full result still
reaches display, hooks, and tracing. Return None (the default) to
keep today’s behaviour where the model sees the full output.
Signature
Parameters
Any
required
No description available.
Returns
Optional[Any]
The result of the operation.
Source
View on GitHub
praisonaiagents/tools/base.py at line 270
