Interface IPromptQueryConfig_FrequencyPenalty
-
- All Known Implementing Classes:
GenericOaiQueryConfig
public interface IPromptQueryConfig_FrequencyPenaltyMixin for aquery connection configuration modelthat allows the user to a frequency penalty when executing a prompt query. A frequency penalty is a value that penalizes new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. The exact behavior and the allowed range of values depends on the prompt service implementation.Use of this mixin is optional, but ensures a consistent name for the property. When different prompt service handlers use the same property name, switching between different prompt service handlers preserves the configured data.
See also the
<xp:frequencyPenalty/>Faces component from thehttp://www.xima.de/taglib/xfc/promptnamespace, which provides a user interface for editing the data defined by this mixin.- Since:
- 8.5.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_FREQUENCY_PENALTYThe name of the frequency penalty attribute.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DoublegetFrequencyPenalty()Gets the frequency penalty for the prompt query.voidsetFrequencyPenalty(Double frequencyPenalty)Sets the frequency penalty for the prompt query.
-
-
-
Field Detail
-
ATTR_FREQUENCY_PENALTY
static final String ATTR_FREQUENCY_PENALTY
The name of the frequency penalty attribute. If you implement a custom serialization / deserialization, use this name for the attribute to increase compatibility with other prompt service handlers.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFrequencyPenalty
Double getFrequencyPenalty()
Gets the frequency penalty for the prompt query. The frequency penalty is a value that penalizes new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.- Returns:
- The frequency penalty.
-
setFrequencyPenalty
void setFrequencyPenalty(Double frequencyPenalty)
Sets the frequency penalty for the prompt query. The frequency penalty is a value that penalizes new tokens- Parameters:
frequencyPenalty- The frequency penalty to set.
-
-