To Model Output • AI Agent SDK
to_model_output: Build the compact model-facing view via the “to_model_output“ fn.
to_model_output
Method
</div>
This is a method of the FunctionTool class in the decorator module.
Build the compact model-facing view via the `to_model_output` fn.
Returns `None` when no builder was supplied so the executor falls back to the full output (unchanged behaviour).
Signature
def to_model_output(result: Any) -> Optional[Any]Parameters
ParamField
AnyNo description available.
Returns
ResponseField
Optional[Any]The result of the operation.
Uses
logging.warning
Source
View on GitHubpraisonaiagents/tools/decorator.py at line 218