Record Class Ai21Jurassic2ChatBedrockApi.Ai21Jurassic2ChatRequest.FloatScalePenalty
java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.jurassic2.api.Ai21Jurassic2ChatBedrockApi.Ai21Jurassic2ChatRequest.FloatScalePenalty
- 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.FloatScalePenalty(Float scale, boolean applyToWhitespaces, boolean applyToPunctuations, boolean applyToNumbers, boolean applyToStopwords, boolean applyToEmojis)
extends Record
Penalty with float scale value.
-
Constructor Summary
ConstructorsConstructorDescriptionFloatScalePenalty
(Float scale, boolean applyToWhitespaces, boolean applyToPunctuations, boolean applyToNumbers, boolean applyToStopwords, boolean applyToEmojis) Creates an instance of aFloatScalePenalty
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theapplyToEmojis
record component.boolean
Returns the value of theapplyToNumbers
record component.boolean
Returns the value of theapplyToPunctuations
record component.boolean
Returns the value of theapplyToStopwords
record component.boolean
Returns the value of theapplyToWhitespaces
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.scale()
Returns the value of thescale
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FloatScalePenalty
public FloatScalePenalty(Float scale, boolean applyToWhitespaces, boolean applyToPunctuations, boolean applyToNumbers, boolean applyToStopwords, boolean applyToEmojis) Creates an instance of aFloatScalePenalty
record class.- Parameters:
scale
- the value for thescale
record componentapplyToWhitespaces
- the value for theapplyToWhitespaces
record componentapplyToPunctuations
- the value for theapplyToPunctuations
record componentapplyToNumbers
- the value for theapplyToNumbers
record componentapplyToStopwords
- the value for theapplyToStopwords
record componentapplyToEmojis
- the value for theapplyToEmojis
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
scale
Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-
applyToWhitespaces
public boolean applyToWhitespaces()Returns the value of theapplyToWhitespaces
record component.- Returns:
- the value of the
applyToWhitespaces
record component
-
applyToPunctuations
public boolean applyToPunctuations()Returns the value of theapplyToPunctuations
record component.- Returns:
- the value of the
applyToPunctuations
record component
-
applyToNumbers
public boolean applyToNumbers()Returns the value of theapplyToNumbers
record component.- Returns:
- the value of the
applyToNumbers
record component
-
applyToStopwords
public boolean applyToStopwords()Returns the value of theapplyToStopwords
record component.- Returns:
- the value of the
applyToStopwords
record component
-
applyToEmojis
public boolean applyToEmojis()Returns the value of theapplyToEmojis
record component.- Returns:
- the value of the
applyToEmojis
record component
-