Class SystemPrompt

  • All Implemented Interfaces:
    Serializable

    public final class SystemPrompt
    extends Object
    implements Serializable
    View model POJO for users to define a system prompt that is sent to the prompt provider. The system prompt provides instructions or context for the prompt provider to follow and receives more weight than a user prompt message.
    Since:
    8.5.0
    See Also:
    Serialized Form
    • Field Detail

      • ATTR_ENABLED

        public static final String ATTR_ENABLED
        The name of the enabled 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
      • ATTR_MESSAGE

        public static final String ATTR_MESSAGE
        The name of the message 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
    • Constructor Detail

      • SystemPrompt

        public SystemPrompt()
    • Method Detail

      • getMessage

        public String getMessage()
        Gets the system prompt message. The system prompt is a message that provides context or instructions to the prompt service, and it is given more weight than a user prompt.
        Returns:
        The system prompt message.
      • setMessage

        public void setMessage​(String message)
        Sets the system prompt message. The system prompt is a message that provides context or instructions to the prompt service, and it is given more weight than a user prompt.
        Parameters:
        message - The system prompt message to set.
      • isEnabled

        public boolean isEnabled()
        Checks if the system prompt message is enabled. When disabled, the system prompt will not be sent to the prompt provider.
        Returns:
        true if the system prompt is enabled, false otherwise.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets whether the system prompt message is enabled. When disabled, the system prompt will not be sent to the prompt provider.
        Parameters:
        enabled - true to enable the system prompt, false to disable it.