ai.ModelTurn

class in the ai package.

Reference version

Signature

class ai.ModelTurn

Source:<builtin>/ai/turn.bamlbytes 6051929

Fields

Instance methods

function

media

(self) -> ai.MediaPart[] throws never

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 never

The terminal Text block — the final candidate the runner parses.

function

tool_uses

(self) -> ai.content.ToolUse[] throws never

The ToolUse blocks of the turn, in order.