Record Class TextChatMessage.TextChatMessageTool
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.watsonx.bean.TextChatMessage.TextChatMessageTool
- All Implemented Interfaces:
TextChatMessage
- Enclosing interface:
TextChatMessage
public static record TextChatMessage.TextChatMessageTool(String role, String content, String toolCallId)
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
ConstructorsConstructorDescriptionTextChatMessageTool
(String role, String content, String toolCallId) Creates an instance of aTextChatMessageTool
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.ToolExecutionResultMessage toolExecutionResultMessage) Creates aTextChatMessage.TextChatMessageTool
from aToolExecutionResultMessage
.Creates aTextChatMessage.TextChatMessageTool
.role()
Returns the value of therole
record component.Returns the value of thetoolCallId
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TextChatMessageTool
Creates an instance of aTextChatMessageTool
record class.- Parameters:
role
- the value for therole
record componentcontent
- the value for thecontent
record componenttoolCallId
- the value for thetoolCallId
record component
-
-
Method Details
-
of
public static TextChatMessage.TextChatMessageTool of(dev.langchain4j.data.message.ToolExecutionResultMessage toolExecutionResultMessage) Creates aTextChatMessage.TextChatMessageTool
from aToolExecutionResultMessage
.- Parameters:
toolExecutionResultMessage
- the tool execution result message to convert- Returns:
- the created
TextChatMessage.TextChatMessageTool
-
of
Creates aTextChatMessage.TextChatMessageTool
.- Parameters:
content
- the content of the message tool.toolCallId
- the unique identifier of the message tool.- Returns:
- the created
TextChatMessage.TextChatMessageTool
.
-
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
-
toolCallId
Returns the value of thetoolCallId
record component.- Returns:
- the value of the
toolCallId
record component
-