Package com.azure.ai.openai.models
Class ChatCompletionsFunctionToolDefinitionFunction
java.lang.Object
com.azure.ai.openai.models.ChatCompletionsFunctionToolDefinitionFunction
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionsFunctionToolDefinitionFunction>
public final class ChatCompletionsFunctionToolDefinitionFunction
extends Object
implements com.azure.json.JsonSerializable<ChatCompletionsFunctionToolDefinitionFunction>
The ChatCompletionsFunctionToolDefinitionFunction model.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ChatCompletionsFunctionToolDefinitionFunction class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ChatCompletionsFunctionToolDefinitionFunction from the JsonReader.Get the description property: A description of what the function does, used by the model to choose when and how to call the function.getName()Get the name property: The name of the function to be called.com.azure.core.util.BinaryDataGet the parameters property: The parameters property.isStrict()Get the strict property: Whether to enable strict schema adherence when generating the function call.setDescription(String description) Set the description property: A description of what the function does, used by the model to choose when and how to call the function.setParameters(com.azure.core.util.BinaryData parameters) Set the parameters property: The parameters property.Set the strict property: Whether to enable strict schema adherence when generating the function call.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ChatCompletionsFunctionToolDefinitionFunction
Creates an instance of ChatCompletionsFunctionToolDefinitionFunction class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getDescription
Get the description property: A description of what the function does, used by the model to choose when and how to call the function.- Returns:
- the description value.
-
setDescription
Set the description property: A description of what the function does, used by the model to choose when and how to call the function.- Parameters:
description- the description value to set.- Returns:
- the ChatCompletionsFunctionToolDefinitionFunction object itself.
-
getName
Get the name property: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.- Returns:
- the name value.
-
getParameters
public com.azure.core.util.BinaryData getParameters()Get the parameters property: The parameters property.- Returns:
- the parameters value.
-
setParameters
public ChatCompletionsFunctionToolDefinitionFunction setParameters(com.azure.core.util.BinaryData parameters) Set the parameters property: The parameters property.- Parameters:
parameters- the parameters value to set.- Returns:
- the ChatCompletionsFunctionToolDefinitionFunction object itself.
-
isStrict
Get the strict property: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).- Returns:
- the strict value.
-
setStrict
Set the strict property: Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](docs/guides/function-calling).- Parameters:
strict- the strict value to set.- Returns:
- the ChatCompletionsFunctionToolDefinitionFunction object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ChatCompletionsFunctionToolDefinitionFunction>- Throws:
IOException
-
fromJson
public static ChatCompletionsFunctionToolDefinitionFunction fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ChatCompletionsFunctionToolDefinitionFunction from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ChatCompletionsFunctionToolDefinitionFunction if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ChatCompletionsFunctionToolDefinitionFunction.
-