set_semantic_state
set_semantic_state
Set the semantic state that semantic gates read as
semantic_state, alongside the conversation. The state is stored at
global_data.semantic_state.
Each call replaces the whole state. To change one field, send the whole state with
that field changed; send {} to reset it. Keep it to what your application has
established, such as a total it computed or an order the caller confirmed, rather
than what the caller claims. No other global data reaches the decision model as
state, though a gate question can still bring in a value with a ${global_data...}
variable.
This is shorthand for update_global_data({"semantic_state": state}).
Parameters
state
The new semantic state.
Returns
FunctionResult — self, for chaining.