Class ResponseFunctionToolCall
-
- All Implemented Interfaces:
public final class ResponseFunctionToolCallA tool call to run a function. See the function calling guide for more information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponseFunctionToolCall.BuilderA builder for ResponseFunctionToolCall.
public final classResponseFunctionToolCall.StatusThe status of the item. One of
in_progress,completed, orincomplete. Populated when items are returned via API.
-
Method Summary
Modifier and Type Method Description final Stringarguments()A JSON string of the arguments to pass to the function. final <T extends Any> Targuments(Class<T> functionParametersType)Parses the JSON string defining the arguments to pass to the function to an instance of a class. final StringcallId()The unique ID of the function tool call generated by the model. final Stringname()The name of the function to run. final JsonValue_type()The type of the function tool call. final Optional<String>id()The unique ID of the function tool call. final Optional<ResponseFunctionToolCall.Status>status()The status of the item. final JsonField<String>_arguments()Returns the raw JSON value of arguments. final JsonField<String>_callId()Returns the raw JSON value of callId. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<ResponseFunctionToolCall.Status>_status()Returns the raw JSON value of status. final Map<String, JsonValue>_additionalProperties()final ResponseFunctionToolCall.BuildertoBuilder()final ResponseFunctionToolCallvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseFunctionToolCall.Builderbuilder()Returns a mutable builder for constructing an instance of ResponseFunctionToolCall. -
-
Method Detail
-
arguments
final <T extends Any> T arguments(Class<T> functionParametersType)
Parses the JSON string defining the arguments to pass to the function to an instance of a class. The class must be the same as the class that was used to define the function's parameters when the function was defined.
-
_type
final JsonValue _type()
The type of the function tool call. Always
function_call.Expected to always return the following:
JsonValue.from("function_call")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
status
final Optional<ResponseFunctionToolCall.Status> status()
The status of the item. One of
in_progress,completed, orincomplete. Populated when items are returned via API.
-
_arguments
final JsonField<String> _arguments()
Returns the raw JSON value of arguments.
Unlike arguments, this method doesn't throw if the JSON field has an unexpected type.
-
_callId
final JsonField<String> _callId()
Returns the raw JSON value of callId.
Unlike callId, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<ResponseFunctionToolCall.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseFunctionToolCall.Builder toBuilder()
-
validate
final ResponseFunctionToolCall validate()
-
builder
final static ResponseFunctionToolCall.Builder builder()
Returns a mutable builder for constructing an instance of ResponseFunctionToolCall.
The following fields are required:
.arguments() .callId() .name()
-
-
-
-