Package com.sap.ai.sdk.orchestration
Class SystemMessage
java.lang.Object
com.sap.ai.sdk.orchestration.Message
com.sap.ai.sdk.orchestration.SystemMessage
Represents a chat message as 'system' to the orchestration service.
-
Constructor Summary
ConstructorsConstructorDescriptionSystemMessage(String message) Creates a new system message from a string.SystemMessage(String message, CacheControl cacheControl) Creates a new system message from a string, allows for cache checkpoint configuration. -
Method Summary
-
Constructor Details
-
SystemMessage
Creates a new system message from a string.- Parameters:
message- the first message.
-
SystemMessage
Creates a new system message from a string, allows for cache checkpoint configuration.- Parameters:
message- the first message.cacheControl- prompt caching configuration to use. Can benullif not applicable.- Since:
- 1.23.0
-
-
Method Details
-
withText
Add text to the message.- Parameters:
message- the text to add.- Returns:
- the new message.
- Since:
- 1.3.0
-
withText
@Nonnull public SystemMessage withText(@Nonnull String message, @Nullable CacheControl cacheControl) Add text to the message.- Parameters:
message- the text to add.cacheControl- optional cache checkpoint configuration.- Returns:
- the new message.
- Since:
- 1.23.0
-
createChatMessage
-
role
The role of the assistant. -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode() -
content
The content of the message.
-