Class SystemPrompt
- java.lang.Object
-
- de.xima.fc.prompt.service.support.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 Summary
Fields Modifier and Type Field Description static StringATTR_ENABLEDThe name of the enabled attribute.static StringATTR_MESSAGEThe name of the message attribute.
-
Constructor Summary
Constructors Constructor Description SystemPrompt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Gets the system prompt message.booleanisEnabled()Checks if the system prompt message is enabled.voidsetEnabled(boolean enabled)Sets whether the system prompt message is enabled.voidsetMessage(String message)Sets the system prompt message.
-
-
-
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
-
-
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:
trueif the system prompt is enabled,falseotherwise.
-
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-trueto enable the system prompt,falseto disable it.
-
-