Class SystemPrompt
java.lang.Object
de.xima.fc.prompt.service.support.SystemPrompt
- All Implemented Interfaces:
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the system prompt message.booleanChecks 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 Details
-
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:
-
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:
-
-
Constructor Details
-
SystemPrompt
public SystemPrompt()
-
-
Method Details
-
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
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.
-