Commands
alloy.command ¶
command ¶
command(fn=None, *, output=_MISSING, tools=None, model=None, temperature=None, max_tokens=None, system=None, retry=None, retry_on=None)
Decorator to declare an AI-powered command.
The wrapped function returns an English prompt specification. This executes
the model with optional tools and parses the result into the annotated
return type. The retry
parameter represents total attempts (minimum 1).