Record Class ToolCall
java.lang.Object
java.lang.Record
smile.llm.ToolCall
- Record Components:
id- client-visible call id (e.g.call_abc123).type- always"function"for v1.function- function name and JSON arguments.
OpenAI-compatible tool call emitted by the assistant.
-
Constructor Summary
ConstructorsConstructorDescriptionToolCall(String id, String type, FunctionCall function) Compact canonical constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.static ToolCallfunction(String id, FunctionCall function) Convenience factory for a function tool call.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ToolCall
Compact canonical constructor.
-
-
Method Details
-
function
Convenience factory for a function tool call.- Parameters:
id- call id.function- function payload.- Returns:
- tool call with
type = "function".
-
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). -
id
-
type
-
function
-