rulvar API reference / @rulvar/core / extractCandidate
Function: extractCandidate()
ts
function extractCandidate(turn, tier):
| {
raw: unknown;
}
| undefined;Defined in: packages/core/src/runtime/structured-output.ts:69
Extracts the structured-output candidate from a collected turn per tier. Returns undefined when the turn carries no candidate (for example the model answered prose without the forced tool call).
Parameters
| Parameter | Type |
|---|---|
turn | CollectedTurn |
tier | StructuredOutputTier |
Returns
| { raw: unknown; } | undefined