Skip to content

GuardrailContextualGroundingFilterConfigDict

Dictionary Type

GuardrailContextualGroundingFilterConfigDict

Bases: TypedDict

Dictionary form of GuardrailContextualGroundingFilterConfig.

Attributes

action instance-attribute
action: str | None

Specifies the action to take when content fails the contextual grounding evaluation. Supported values include:

  • BLOCK -- Block the content and replace it with blocked messaging.

  • NONE -- Take no action but return detection information in the trace response.

enabled instance-attribute
enabled: bool | None

Specifies whether to enable contextual grounding evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.

threshold instance-attribute
threshold: Required[float]

The threshold details for the guardrails contextual grounding filter.

type instance-attribute
type: Required[str]

The filter details for the guardrails contextual grounding filter.