Interface GuardrailContextualGroundingFilter.Builder

    • Method Detail

      • threshold

        GuardrailContextualGroundingFilter.Builder threshold​(Double threshold)

        The threshold details for the guardrails contextual grounding filter.

        Parameters:
        threshold - The threshold details for the guardrails contextual grounding filter.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • action

        GuardrailContextualGroundingFilter.Builder action​(String action)

        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.

        Parameters:
        action - 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        GuardrailContextualGroundingAction, GuardrailContextualGroundingAction
      • action

        GuardrailContextualGroundingFilter.Builder action​(GuardrailContextualGroundingAction action)

        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.

        Parameters:
        action - 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        GuardrailContextualGroundingAction, GuardrailContextualGroundingAction
      • enabled

        GuardrailContextualGroundingFilter.Builder enabled​(Boolean enabled)

        Indicates whether contextual grounding is enabled for evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.

        Parameters:
        enabled - Indicates whether contextual grounding is enabled for evaluation. When disabled, you aren't charged for the evaluation. The evaluation doesn't appear in the response.
        Returns:
        Returns a reference to this object so that method calls can be chained together.