Class AIGuard.Options

java.lang.Object
datadog.trace.api.aiguard.AIGuard.Options
Enclosing class:
AIGuard

public static final class AIGuard.Options extends Object
Configuration options for AIGuard evaluation behavior.

Options control how the evaluation process behaves, including whether to block execution when unsafe content is detected.

Example usage:


 // Use default options (follows remote is_blocking_enabled setting)
 var result = AIGuard.evaluate(messages);

 // Disable blocking mode
 var options = new AIGuard.Options()
     .block(false);
 var result = AIGuard.evaluate(messages, options);
 
  • Field Details

    • DEFAULT

      public static final AIGuard.Options DEFAULT
      Default options that follow the remote is_blocking_enabled setting.
  • Constructor Details

    • Options

      public Options()
  • Method Details

    • block

      public boolean block()
      Returns whether blocking mode is enabled.
      Returns:
      true if execution should be blocked on DENY/ABORT actions
    • block

      public AIGuard.Options block(boolean block)
      Enable/disable blocking mode
      Parameters:
      block - true if execution should be blocked on DENY/ABORT actions