Record Class TextChatMessage.TextChatToolCall
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.watsonx.bean.TextChatMessage.TextChatToolCall
- Enclosing interface:
TextChatMessage
public static record TextChatMessage.TextChatToolCall(Integer index, String id, String type, TextChatMessage.TextChatToolCall.TextChatFunctionCall function)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
-
Constructor Summary
ConstructorsConstructorDescriptionTextChatToolCall
(Integer index, String id, String type, TextChatMessage.TextChatToolCall.TextChatFunctionCall function) Creates an instance of aTextChatToolCall
record class. -
Method Summary
Modifier and TypeMethodDescriptiondev.langchain4j.agent.tool.ToolExecutionRequest
convert()
Converts aTextChatMessage.TextChatToolCall
into aToolExecutionRequest
.final boolean
Indicates whether some other object is "equal to" this one.function()
Returns the value of thefunction
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.index()
Returns the value of theindex
record component.of
(dev.langchain4j.agent.tool.ToolExecutionRequest toolExecutionRequest) Creates aTextChatMessage.TextChatToolCall
from aToolExecutionRequest
.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
TextChatToolCall
public TextChatToolCall(Integer index, String id, String type, TextChatMessage.TextChatToolCall.TextChatFunctionCall function) Creates an instance of aTextChatToolCall
record class.- Parameters:
index
- the value for theindex
record componentid
- the value for theid
record componenttype
- the value for thetype
record componentfunction
- the value for thefunction
record component
-
-
Method Details
-
of
public static TextChatMessage.TextChatToolCall of(dev.langchain4j.agent.tool.ToolExecutionRequest toolExecutionRequest) Creates aTextChatMessage.TextChatToolCall
from aToolExecutionRequest
.- Parameters:
toolExecutionRequest
- the tool execution request to convert- Returns:
- the created
TextChatMessage.TextChatToolCall
-
convert
public dev.langchain4j.agent.tool.ToolExecutionRequest convert()Converts aTextChatMessage.TextChatToolCall
into aToolExecutionRequest
.- Returns:
- the converted
ToolExecutionRequest
-
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)
. -
index
Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
function
Returns the value of thefunction
record component.- Returns:
- the value of the
function
record component
-