gate
Add a semantic gate: a yes/no question a decision model answers
about the call right before the function runs. Every gate must pass. When one
fails, the data_map doesn’t run, and the AI gets the on_fail output of the
first failing gate.
Call gate() once per gate, up to 8. The gates are checked when
to_swaig_function() builds the function, which raises
ValueError for any gate the platform would refuse. To set what the AI says during
the check, use gate_fillers().
Parameters
gate
A SemanticGate, or a gate dict in the platform’s shape
(question, threshold, on_fail, and optional id, criteria,
visual_input).
Returns
DataMap — Self for method chaining.