Class GraniteGuardian41

java.lang.Object
com.sap.ai.sdk.prompt.registry.model.GraniteGuardian41

public class GraniteGuardian41 extends Object
Configuration for IBM Granite Guardian 4.1 filter provider.
  • Constructor Details

    • GraniteGuardian41

      protected GraniteGuardian41()
      Default constructor for GraniteGuardian41.
  • Method Details

    • enableReasoning

      @Nonnull public GraniteGuardian41 enableReasoning(@Nullable Boolean enableReasoning)
      Set the enableReasoning of this GraniteGuardian41 instance and return the same instance.
      Parameters:
      enableReasoning - Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. Returns reasoning content when enabled, e.g. 'harm': {'verdict': true, 'reasoning': '...'}
      Returns:
      The same instance of this GraniteGuardian41 class
    • isEnableReasoning

      @Nonnull public Boolean isEnableReasoning()
      Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. Returns reasoning content when enabled, e.g. 'harm': {'verdict': true, 'reasoning': '...'}
      Returns:
      enableReasoning The enableReasoning of this GraniteGuardian41 instance.
    • setEnableReasoning

      public void setEnableReasoning(@Nullable Boolean enableReasoning)
      Set the enableReasoning of this GraniteGuardian41 instance.
      Parameters:
      enableReasoning - Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. Returns reasoning content when enabled, e.g. 'harm': {'verdict': true, 'reasoning': '...'}
    • categories

      @Nonnull public GraniteGuardian41 categories(@Nonnull GraniteGuardian41Categories categories)
      Set the categories of this GraniteGuardian41 instance and return the same instance.
      Parameters:
      categories - The categories of this GraniteGuardian41
      Returns:
      The same instance of this GraniteGuardian41 class
    • getCategories

      @Nonnull public GraniteGuardian41Categories getCategories()
      Get categories
      Returns:
      categories The categories of this GraniteGuardian41 instance.
    • setCategories

      public void setCategories(@Nonnull GraniteGuardian41Categories categories)
      Set the categories of this GraniteGuardian41 instance.
      Parameters:
      categories - The categories of this GraniteGuardian41
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the GraniteGuardian41.
      Returns:
      The set of properties names
    • getCustomField

      @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
      Deprecated.
      Use toMap() instead.
      Get the value of an unrecognizable property of this GraniteGuardian41 instance.
      Parameters:
      name - The name of the property
      Returns:
      The value of the property
      Throws:
      NoSuchElementException - If no property with the given name could be found.
    • toMap

      @Nonnull public Map<String,Object> toMap()
      Get the value of all properties of this GraniteGuardian41 instance including unrecognized properties.
      Returns:
      The map of all properties
    • setCustomField

      public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
      Set an unrecognizable property of this GraniteGuardian41 instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      customFieldName - The name of the property
      customFieldValue - The value of the property
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • create

      public static GraniteGuardian41.Builder create()
      Create a type-safe, fluent-api builder object to construct a new GraniteGuardian41 instance with all required arguments.