Package dev.langchain4j.data.message
Class SystemMessage
java.lang.Object
dev.langchain4j.data.message.SystemMessage
- All Implemented Interfaces:
ChatMessage
Represents a system message, typically defined by a developer.
This type of message usually provides instructions regarding the AI's actions, such as its behavior or response style.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static SystemMessage
Creates a new system message.int
hashCode()
static SystemMessage
systemMessage
(String text) Creates a new system message.text()
Returns the message text.toString()
type()
The type of the message.
-
Constructor Details
-
SystemMessage
Creates a new system message.- Parameters:
text
- the message text.
-
-
Method Details
-
text
Returns the message text.- Specified by:
text
in interfaceChatMessage
- Returns:
- the message text.
-
type
Description copied from interface:ChatMessage
The type of the message.- Specified by:
type
in interfaceChatMessage
- Returns:
- the type of the message
-
equals
-
hashCode
public int hashCode() -
toString
-
from
Creates a new system message.- Parameters:
text
- the message text.- Returns:
- the system message.
-
systemMessage
Creates a new system message.- Parameters:
text
- the message text.- Returns:
- the system message.
-