RequiredFunctionToolCall Class

public final class RequiredFunctionToolCall
extends RequiredToolCall

A representation of a requested call to a function tool, needed by the model to continue evaluation of a run.

Method Summary

Modifier and Type Method and Description
static RequiredFunctionToolCall fromJson(JsonReader jsonReader)

Reads an instance of RequiredFunctionToolCall from the JsonReader.

RequiredFunctionToolCallDetails getFunction()

Get the function property: Detailed information about the function to be executed by the tool that includes name and arguments.

String getType()

Get the type property: The object type for the required tool call.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from RequiredToolCall

Methods inherited from java.lang.Object

Method Details

fromJson

public static RequiredFunctionToolCall fromJson(JsonReader jsonReader)

Reads an instance of RequiredFunctionToolCall from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RequiredFunctionToolCall if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getFunction

public RequiredFunctionToolCallDetails getFunction()

Get the function property: Detailed information about the function to be executed by the tool that includes name and arguments.

Returns:

the function value.

getType

public String getType()

Get the type property: The object type for the required tool call.

Overrides:

RequiredFunctionToolCall.getType()

Returns:

the type value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

RequiredFunctionToolCall.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to