Package dev.langchain4j.data.message
Class SystemMessage
-
- All Implemented Interfaces:
-
dev.langchain4j.data.message.ChatMessage
public class SystemMessage implements 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
Constructors Constructor Description SystemMessage(String text)Creates a new system message.
-
Method Summary
Modifier and Type Method Description Stringtext()Returns the message text. ChatMessageTypetype()The type of the message. booleanequals(Object o)inthashCode()StringtoString()static SystemMessagefrom(String text)Creates a new system message. static SystemMessagesystemMessage(String text)Creates a new system message. -
-
Constructor Detail
-
SystemMessage
SystemMessage(String text)
Creates a new system message.- Parameters:
text- the message text.
-
-
Method Detail
-
type
ChatMessageType type()
The type of the message.
- Returns:
the type of the message
-
hashCode
int hashCode()
-
from
static SystemMessage from(String text)
Creates a new system message.
- Parameters:
text- the message text.- Returns:
the system message.
-
systemMessage
static SystemMessage systemMessage(String text)
Creates a new system message.
- Parameters:
text- the message text.- Returns:
the system message.
-
-
-
-