Interface IPromptQueryConfig_FrequencyPenalty
public interface IPromptQueryConfig_FrequencyPenalty
Mixin for a
query connection configuration model that 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 the http://www.xima.de/taglib/xfc/prompt
namespace, which provides a user interface for editing the data defined by this mixin.
- Since:
- 8.5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the frequency penalty attribute. -
Method Summary
Modifier and TypeMethodDescriptionGets the frequency penalty for the prompt query.voidsetFrequencyPenalty(Double frequencyPenalty) Sets the frequency penalty for the prompt query.
-
Field Details
-
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:
-
-
Method Details
-
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
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.
-