Expand description
What kind of turn a request body represents.
The pipeline’s shaping stages are otherwise built entirely from facts about
the model (ModelContext). This module holds the
one thing they need to know about the request: whether it is asking the
model to emit a tool call.
It lives here, rather than inside the stage that first needed it, because
two stages read the same signal for different purposes —
sampling caps the temperature from it, and
constrain decides whether to originate a grammar —
and a second copy of “does this request carry tools” would eventually
answer differently from the first.
Functions§
- carries_
tools - Whether the request carries a non-empty
toolsarray.