Interface IPromptQueryConfig_PresencePenalty
public interface IPromptQueryConfig_PresencePenalty
Mixin for a
query connection configuration model that allows
the user to a presence penalty when executing a prompt query. A presence penalty is a value that penalizes new tokens
based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. 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:presencePenalty/> 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
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets the presence penalty for the prompt query.voidsetPresencePenalty(Double presencePenalty) Sets the presence penalty for the prompt query.
-
Field Details
-
ATTR_PRESENCE_PENALTY
The name of the presence 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
-
getPresencePenalty
Double getPresencePenalty()Gets the presence penalty for the prompt query. The presence penalty is a value that penalizes new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.- Returns:
- The presence penalty.
-
setPresencePenalty
Sets the presence penalty for the prompt query. The presence penalty is a value that penalizes new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.- Parameters:
presencePenalty- The presence penalty to set.
-