Class ChatCompletionMessageToolCall.Function
-
- All Implemented Interfaces:
public final class ChatCompletionMessageToolCall.Function
The function that the model called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ChatCompletionMessageToolCall.Function.Builder
A builder for Function.
-
Method Summary
Modifier and Type Method Description final String
arguments()
The arguments to call the function with, as generated by the model in JSON format. final <T extends Any> T
arguments(Class<T> functionParametersType)
Gets the arguments to the function call, converting the values from the model in JSON format to an instance of a class that holds those values. final String
name()
The name of the function to call. final JsonField<String>
_arguments()
Returns the raw JSON value of arguments. final JsonField<String>
_name()
Returns the raw JSON value of name. final Map<String, JsonValue>
_additionalProperties()
final ChatCompletionMessageToolCall.Function.Builder
toBuilder()
final ChatCompletionMessageToolCall.Function
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletionMessageToolCall.Function.Builder
builder()
Returns a mutable builder for constructing an instance of Function. -
-
Method Detail
-
arguments
final String arguments()
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
-
arguments
final <T extends Any> T arguments(Class<T> functionParametersType)
Gets the arguments to the function call, converting the values from the model in JSON format to an instance of a class that holds those values. The class must previously have been used to define the JSON schema for the function definition's parameters, so that the JSON corresponds to structure of the given class.
-
_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.
-
_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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatCompletionMessageToolCall.Function.Builder toBuilder()
-
validate
final ChatCompletionMessageToolCall.Function validate()
-
builder
final static ChatCompletionMessageToolCall.Function.Builder builder()
Returns a mutable builder for constructing an instance of Function.
The following fields are required:
.arguments() .name()
-
-
-
-