gate_conversation
gate_conversation
The dialogue a semantic gate judges now, as "role: text" lines,
oldest first. The lines are the spoken turns the model sees (see
model_view()), chosen as the platform chooses them:
- With the gate’s
sincemark set, the turns from the agent’s first turn at or after the mark. - Otherwise, with
dialogueset to"proposal"(the gate’s, or the agent’ssemantic_gate_dialogue) and a proposal recorded, the turns from the agent’s first turn aftersemantic_statelast changed. - Otherwise, the window.
Then at most history of the newest: the gate’s, the agent’s
semantic_gate_history, or 20. Pass it to your gate callback to judge a gate in a
test, for example gates=lambda gate, sim, args: judge(gate["question"], sim.gate_conversation(gate)).
Parameters
gate
The gate’s dictionary, or just its dialogue, history, and since keys.
None uses the agent’s settings.
Returns
list[str] — The lines, such as "user: Yes.".
Raises
NotImplementedError once the call has entered a step with a reset, as for
model_view().