Class ExplanationConfig

java.lang.Object
com.sap.ai.sdk.foundationmodels.rpt.generated.model.ExplanationConfig

public class ExplanationConfig extends Object
Configuration for explainability outputs.
  • Constructor Details

    • ExplanationConfig

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

    • topColumnScores

      @Nonnull public ExplanationConfig topColumnScores(@Nullable Integer topColumnScores)
      Set the topColumnScores of this ExplanationConfig instance and return the same instance.
      Parameters:
      topColumnScores - For how many columns to output column scores (optional, default is 0). 0 by default (no explainability). Max value is 20. Minimum: 0 Maximum: 20
      Returns:
      The same instance of this ExplanationConfig class
    • getTopColumnScores

      @Nonnull public Integer getTopColumnScores()
      For how many columns to output column scores (optional, default is 0). 0 by default (no explainability). Max value is 20. minimum: 0 maximum: 20
      Returns:
      topColumnScores The topColumnScores of this ExplanationConfig instance.
    • setTopColumnScores

      public void setTopColumnScores(@Nullable Integer topColumnScores)
      Set the topColumnScores of this ExplanationConfig instance.
      Parameters:
      topColumnScores - For how many columns to output column scores (optional, default is 0). 0 by default (no explainability). Max value is 20. Minimum: 0 Maximum: 20
    • topRelevantContextRows

      @Nonnull public ExplanationConfig topRelevantContextRows(@Nullable Integer topRelevantContextRows)
      Set the topRelevantContextRows of this ExplanationConfig instance and return the same instance.
      Parameters:
      topRelevantContextRows - For how many context rows to return indices per query row (optional, default is 0). 0 by default (no explainability). Max value is 20. Minimum: 0 Maximum: 20
      Returns:
      The same instance of this ExplanationConfig class
    • getTopRelevantContextRows

      @Nonnull public Integer getTopRelevantContextRows()
      For how many context rows to return indices per query row (optional, default is 0). 0 by default (no explainability). Max value is 20. minimum: 0 maximum: 20
      Returns:
      topRelevantContextRows The topRelevantContextRows of this ExplanationConfig instance.
    • setTopRelevantContextRows

      public void setTopRelevantContextRows(@Nullable Integer topRelevantContextRows)
      Set the topRelevantContextRows of this ExplanationConfig instance.
      Parameters:
      topRelevantContextRows - For how many context rows to return indices per query row (optional, default is 0). 0 by default (no explainability). Max value is 20. Minimum: 0 Maximum: 20
    • getCustomFieldNames

      @Nonnull public Set<String> getCustomFieldNames()
      Get the names of the unrecognizable properties of the ExplanationConfig.
      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 ExplanationConfig 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 ExplanationConfig 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 ExplanationConfig 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 ExplanationConfig create()
      Create a new ExplanationConfig instance. No arguments are required.