Record Class TextChatMessage.TextChatMessageSystem
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.watsonx.bean.TextChatMessage.TextChatMessageSystem
- All Implemented Interfaces:
TextChatMessage
- Enclosing interface:
TextChatMessage
public static record TextChatMessage.TextChatMessageSystem(String role, String content)
extends Record
implements TextChatMessage
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkiverse.langchain4j.watsonx.bean.TextChatMessage
TextChatMessage.StreamingToolFetcher, TextChatMessage.TextChatMessageAssistant, TextChatMessage.TextChatMessageSystem, TextChatMessage.TextChatMessageTool, TextChatMessage.TextChatMessageUser, TextChatMessage.TextChatParameterTool, TextChatMessage.TextChatToolCall
-
Constructor Summary
ConstructorsConstructorDescriptionTextChatMessageSystem
(String role, String content) Creates an instance of aTextChatMessageSystem
record class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()
Returns the value of thecontent
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.of
(dev.langchain4j.data.message.SystemMessage systemMessage) Creates aTextChatMessage.TextChatMessageSystem
from aSystemMessage
.Creates aTextChatMessage.TextChatMessageSystem
.role()
Returns the value of therole
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TextChatMessageSystem
-
-
Method Details
-
of
public static TextChatMessage.TextChatMessageSystem of(dev.langchain4j.data.message.SystemMessage systemMessage) Creates aTextChatMessage.TextChatMessageSystem
from aSystemMessage
.- Parameters:
systemMessage
- the system message to convert- Returns:
- the created
TextChatMessage.TextChatMessageSystem
.
-
of
Creates aTextChatMessage.TextChatMessageSystem
.- Parameters:
message
- the content of the system message to be created.- Returns:
- the created
TextChatMessage.TextChatMessageSystem
.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
role
Returns the value of therole
record component.- Returns:
- the value of the
role
record component
-
content
Returns the value of thecontent
record component.- Returns:
- the value of the
content
record component
-