Consumption Capturing Prompt Executor
A CapturingPromptExecutor that wraps a delegate executor, runs each call through it, and accumulates the LLMConsumption extracted from the returned Message.Assistant's metadata.
The training infrastructure creates one per leaf prompt call (via the session's capturingExecutorFactory) and reads accumulated consumption between retry attempts via collectAndClear. Subclasses supply the provider-specific extractConsumption.
Inheritors
Functions
Returns the consumption accumulated since the previous call (or since construction), then resets the accumulator. Returns null when nothing was captured.
Pre-resolved-model overload of execute; captures consumption the same way.
Runs the call through delegate and accumulates any LLMConsumption reported by extractConsumption for the returned response. Accumulation is thread-safe.
Pre-resolved-model overload of executeStreaming; also captures nothing.
Delegates streaming to delegate; no consumption is captured from streamed frames.
Executes prompt against model, requesting a structured response of type OutputStructT, and returns the parsed data.
Delegates model resolution, so the wrapped executor keeps its fallback/routing behaviour.