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 aTextChatMessageToolrecord 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.ToolExecutionResultMessage toolExecutionResultMessage) Creates aTextChatMessage.TextChatMessageToolfrom aToolExecutionResultMessage.Creates aTextChatMessage.TextChatMessageTool.role()Returns the value of therolerecord component.Returns the value of thetoolCallIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextChatMessageTool
Creates an instance of aTextChatMessageToolrecord class.- Parameters:
role- the value for therolerecord componentcontent- the value for thecontentrecord componenttoolCallId- the value for thetoolCallIdrecord component
-
-
Method Details
-
of
public static TextChatMessage.TextChatMessageTool of(dev.langchain4j.data.message.ToolExecutionResultMessage toolExecutionResultMessage) Creates aTextChatMessage.TextChatMessageToolfrom 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 therolerecord component.- Returns:
- the value of the
rolerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
toolCallId
Returns the value of thetoolCallIdrecord component.- Returns:
- the value of the
toolCallIdrecord component
-