Record Class TextChatMessage.TextChatMessageAssistant
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.watsonx.bean.TextChatMessage.TextChatMessageAssistant
- All Implemented Interfaces:
TextChatMessage
- Enclosing interface:
TextChatMessage
public static record TextChatMessage.TextChatMessageAssistant(String role, String content, List<TextChatMessage.TextChatToolCall> toolCalls)
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
ConstructorsConstructorDescriptionTextChatMessageAssistant(String role, String content, List<TextChatMessage.TextChatToolCall> toolCalls) Creates an instance of aTextChatMessageAssistantrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.of(dev.langchain4j.data.message.AiMessage aiMessage) Creates aTextChatMessage.TextChatMessageAssistantfrom aAiMessage.Creates aTextChatMessage.TextChatMessageAssistant.of(List<TextChatMessage.TextChatToolCall> toolCalls) Creates aTextChatMessage.TextChatMessageAssistant.role()Returns the value of therolerecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextChatMessageAssistant
public TextChatMessageAssistant(String role, String content, List<TextChatMessage.TextChatToolCall> toolCalls) Creates an instance of aTextChatMessageAssistantrecord class.- Parameters:
role- the value for therolerecord componentcontent- the value for thecontentrecord componenttoolCalls- the value for thetoolCallsrecord component
-
-
Method Details
-
of
public static TextChatMessage.TextChatMessageAssistant of(dev.langchain4j.data.message.AiMessage aiMessage) Creates aTextChatMessage.TextChatMessageAssistantfrom aAiMessage.- Parameters:
aiMessage- the ai message to convert- Returns:
- the created
TextChatMessage.TextChatMessageAssistant
-
of
Creates aTextChatMessage.TextChatMessageAssistant.- Parameters:
message- the content of the system message to be created.- Returns:
- the created
TextChatMessage.TextChatMessageAssistant.
-
of
public static TextChatMessage.TextChatMessageAssistant of(List<TextChatMessage.TextChatToolCall> toolCalls) Creates aTextChatMessage.TextChatMessageAssistant.- Parameters:
toolCalls- the tools to execute.- Returns:
- the created
TextChatMessage.TextChatMessageAssistant.
-
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 therolerecord component.- Returns:
- the value of the
rolerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
toolCalls
Returns the value of thetoolCallsrecord component.- Returns:
- the value of the
toolCallsrecord component
-