Record Class Ai21Jurassic2ChatBedrockApi.Ai21Jurassic2ChatRequest.IntegerScalePenalty

java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.jurassic2.api.Ai21Jurassic2ChatBedrockApi.Ai21Jurassic2ChatRequest.IntegerScalePenalty
Record Components:
scale - The scale value controls the strength of the penalty. Use a higher value to lower the probability of generating new tokens that already appear at least once in the prompt or in the completion.
applyToWhitespaces - Reduce the probability of repetition of special characters. A true value applies the penalty to whitespaces and new lines.
applyToPunctuations - Reduce the probability of repetition of special characters. A true value applies the penalty to punctuations.
applyToNumbers - Reduce the probability of repetition of special characters. A true value applies the penalty to numbers.
applyToStopwords - Reduce the probability of repetition of special characters. A true value applies the penalty to stopwords.
applyToEmojis - Reduce the probability of repetition of special characters. A true value applies the penalty to emojis.
Enclosing class:
Ai21Jurassic2ChatBedrockApi.Ai21Jurassic2ChatRequest

public static record Ai21Jurassic2ChatBedrockApi.Ai21Jurassic2ChatRequest.IntegerScalePenalty(Integer scale, boolean applyToWhitespaces, boolean applyToPunctuations, boolean applyToNumbers, boolean applyToStopwords, boolean applyToEmojis) extends Record
Penalty with integer scale value.
  • Constructor Details

    • IntegerScalePenalty

      public IntegerScalePenalty(Integer scale, boolean applyToWhitespaces, boolean applyToPunctuations, boolean applyToNumbers, boolean applyToStopwords, boolean applyToEmojis)
      Creates an instance of a IntegerScalePenalty record class.
      Parameters:
      scale - the value for the scale record component
      applyToWhitespaces - the value for the applyToWhitespaces record component
      applyToPunctuations - the value for the applyToPunctuations record component
      applyToNumbers - the value for the applyToNumbers record component
      applyToStopwords - the value for the applyToStopwords record component
      applyToEmojis - the value for the applyToEmojis record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • scale

      public Integer scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • applyToWhitespaces

      public boolean applyToWhitespaces()
      Returns the value of the applyToWhitespaces record component.
      Returns:
      the value of the applyToWhitespaces record component
    • applyToPunctuations

      public boolean applyToPunctuations()
      Returns the value of the applyToPunctuations record component.
      Returns:
      the value of the applyToPunctuations record component
    • applyToNumbers

      public boolean applyToNumbers()
      Returns the value of the applyToNumbers record component.
      Returns:
      the value of the applyToNumbers record component
    • applyToStopwords

      public boolean applyToStopwords()
      Returns the value of the applyToStopwords record component.
      Returns:
      the value of the applyToStopwords record component
    • applyToEmojis

      public boolean applyToEmojis()
      Returns the value of the applyToEmojis record component.
      Returns:
      the value of the applyToEmojis record component