ai.ModelTurn
class in the ai package.
Reference version
Signature
class ai.ModelTurnSource:<builtin>/ai/turn.bamlbytes 802–2255
Fields
parsed_output
ai.ParsedOutput | nullcontent
stop_reason
usage
ai.events.Usage | nullmodel
string | nullcalls
Instance methods
The media payloads the turn produced, in order. A media-shaped output type is built from these instead of from the terminal text.
function
terminal_text
(self) -> string | null throws neverThe terminal Text block — the final candidate the runner parses.
The ToolUse blocks of the turn, in order.