Record Class ToolCallResponse
java.lang.Object
java.lang.Record
bg.codexio.ai.openai.api.payload.chat.response.ToolCallResponse
- All Implemented Interfaces:
Mergeable<ToolCallResponse>
public record ToolCallResponse(Integer index, String id, String type, FunctionResponse function)
extends Record
implements Mergeable<ToolCallResponse>
-
Constructor Summary
ConstructorsConstructorDescriptionToolCallResponse(Integer index, String id, String type, FunctionResponse function) Creates an instance of aToolCallResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolCallResponseempty()final booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.index()Returns the value of theindexrecord component.merge(ToolCallResponse other) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ToolCallResponse
Creates an instance of aToolCallResponserecord class.- Parameters:
index- the value for theindexrecord componentid- the value for theidrecord componenttype- the value for thetyperecord componentfunction- the value for thefunctionrecord component
-
-
Method Details
-
empty
-
merge
- Specified by:
mergein interfaceMergeable<ToolCallResponse>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 theindexrecord component.- Returns:
- the value of the
indexrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-