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

python
def to_model_output(result: Any) -> Optional[Any]

Parameters

ParamField Any

No description available.

Returns

ResponseField Optional[Any]

The result of the operation.

Uses

  • logging.warning

Source

View on GitHub

praisonaiagents/tools/decorator.py at line 218


Related Documentation