Annotation Interface OutputGuardrailAccumulator
An annotation to configure token accumulation when output guardrails are applied on streamed responses.
The accumulator is invoked before the guardrails are applied to the output of the model, and invoke the guardrail chain on the accumulated tokens. The guardrail may be called multiple time depending on the accumulation strategy.
If the annotation is not present and the output is streamed, the default behavior is to accumulate all the tokens before applying the guardrails.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass
<? extends OutputTokenAccumulator> The class of the CDI bean implementing theOutputTokenAccumulator
interface.
-
Element Details
-
value
Class<? extends OutputTokenAccumulator> valueThe class of the CDI bean implementing theOutputTokenAccumulator
interface.
-