Skip to content

extends

This docs was updated at: 2026-02-23

com.paragon.responses.spec.extends  ยท  Class


Methods

BoundedFunctionCall

public BoundedFunctionCall(
      @NonNull String arguments,
      @NonNull String callId,
      @NonNull String name,
      @Nullable String id,
      @Nullable FunctionToolCallStatus status,
      @Nullable FunctionTool<Record> function,
      @Nullable Class<? extends Record> paramClass,
      @Nullable ObjectMapper objectMapper)

Creates a bounded function call.

Parameters

Name Description
arguments A JSON string of the arguments to pass to the function.
callId The unique ID of the function tool call generated by the model.
name The name of the function to run.
id The unique ID of the function tool call.
status The status of the item.
function The function implementation to invoke.
paramClass The class to deserialize parameters into.
objectMapper The ObjectMapper to use for deserialization.

call

public @NonNull FunctionToolCallOutput call() throws JsonProcessingException

Invokes the bound function with the deserialized arguments.

The JSON arguments from the API response are deserialized into the parameter class, then the function implementation is called with those parameters.

Returns

the function tool call output

Throws

Type Condition
JsonProcessingException if the arguments cannot be deserialized
IllegalStateException if this call is not bound to a function implementation

isBound

public boolean isBound()

Checks if this function call is bound to an implementation.

Returns

true if this call can be invoked


getFunction

public @Nullable FunctionTool<Record> getFunction()

Returns the function implementation, if bound.

Returns

the function implementation, or null if not bound