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 String
text()
Returns the message text. ChatMessageType
type()
The type of the message. boolean
equals(Object o)
int
hashCode()
String
toString()
static SystemMessage
from(String text)
Creates a new system message. static SystemMessage
systemMessage(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.
-
-
-
-