Record Class InferenceSettings

java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.inference.InferenceSettings

public record InferenceSettings(boolean completionEnabled, int completionRowLimit, boolean rerankEnabled, int rerankRowLimit) extends Record
Settings for inference features such as completion and rerank.
  • Field Details

    • COMPLETION_ENABLED_SETTING

      public static final Setting<Boolean> COMPLETION_ENABLED_SETTING
    • COMPLETION_ROW_LIMIT_SETTING

      public static final Setting<Integer> COMPLETION_ROW_LIMIT_SETTING
    • RERANK_ENABLED_SETTING

      public static final Setting<Boolean> RERANK_ENABLED_SETTING
    • RERANK_ROW_LIMIT_SETTING

      public static final Setting<Integer> RERANK_ROW_LIMIT_SETTING
  • Constructor Details

    • InferenceSettings

      public InferenceSettings(Settings settings)
    • InferenceSettings

      public InferenceSettings(boolean completionEnabled, int completionRowLimit, boolean rerankEnabled, int rerankRowLimit)
      Creates an instance of a InferenceSettings record class.
      Parameters:
      completionEnabled - the value for the completionEnabled record component
      completionRowLimit - the value for the completionRowLimit record component
      rerankEnabled - the value for the rerankEnabled record component
      rerankRowLimit - the value for the rerankRowLimit record component
  • Method Details

    • getSettings

      public static List<Setting<?>> getSettings()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • completionEnabled

      public boolean completionEnabled()
      Returns the value of the completionEnabled record component.
      Returns:
      the value of the completionEnabled record component
    • completionRowLimit

      public int completionRowLimit()
      Returns the value of the completionRowLimit record component.
      Returns:
      the value of the completionRowLimit record component
    • rerankEnabled

      public boolean rerankEnabled()
      Returns the value of the rerankEnabled record component.
      Returns:
      the value of the rerankEnabled record component
    • rerankRowLimit

      public int rerankRowLimit()
      Returns the value of the rerankRowLimit record component.
      Returns:
      the value of the rerankRowLimit record component