Interface IPromptQueryConfig_Temperature

  • All Known Implementing Classes:
    GenericOaiQueryConfig

    public interface IPromptQueryConfig_Temperature
    Mixin for a query connection configuration model that allows the user to enter an optional temperature. A temperature is a value that controls the randomness of the output. Usually higher values will make the output more random, while lower values will make it more focused and deterministic. The exact behavior and the allowed range for the temperature value 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 system prompt.

    See also the <xp:temperature/> 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 Detail

      • ATTR_TEMPERATURE

        static final String ATTR_TEMPERATURE
        The name of the temperature 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

      • getTemperature

        Double getTemperature()
        Gets the temperature for the prompt query. The temperature is a value that controls the randomness of the output. Usually higher values will make the output more random, while lower values will make it more focused and deterministic.
        Returns:
        The temperature.
      • setTemperature

        void setTemperature​(Double temperature)
        Sets the temperature for the prompt query. The temperature is a value that controls the randomness of the output. Usually higher values will make the output more random, while lower values will make it more focused and deterministic.
        Parameters:
        temperature - The temperature to set.