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 Details

    • ChatCompletionsFunctionToolDefinitionFunction

      public ChatCompletionsFunctionToolDefinitionFunction(String name)
      Creates an instance of ChatCompletionsFunctionToolDefinitionFunction class.
      Parameters:
      name - the name value to set.
  • Method Details

    • getDescription

      public String 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

      public ChatCompletionsFunctionToolDefinitionFunction 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.
      Parameters:
      description - the description value to set.
      Returns:
      the ChatCompletionsFunctionToolDefinitionFunction object itself.
    • getName

      public String 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

      public Boolean 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.