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.Response 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.
Runs the call through delegate and accumulates any LLMConsumption reported by extractConsumption for the returned responses. Accumulation is thread-safe.
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 moderation to delegate; no consumption is captured.