setControlVector method

Future<void> setControlVector(
  1. ControlVector? vector
)

Steers every following reply of every conversation of this model with vector, or stops steering with null.

The model's computed state holds only under the vector it was computed with, so a different vector resets it: each ChatSession keeps its messages, and its next ChatSession.send prefills them again under the new vector, giving what a model steered from the start would. Saved states (warmUp(statePath:)) record the vector and are not loaded under another. A vector that steers exactly as the current one changes nothing.

Throws StateError while a reply or a warm-up is running (call it between replies), ArgumentError for a vector of another model.

Implementation

Future<void> setControlVector(ControlVector? vector) =>
    _steer(_model, vector);