Class ChatCompletionsFunctionToolCall

java.lang.Object
com.azure.ai.inference.models.ChatCompletionsToolCall
com.azure.ai.inference.models.ChatCompletionsFunctionToolCall
All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionsToolCall>

public final class ChatCompletionsFunctionToolCall extends ChatCompletionsToolCall
A tool call to a function tool, issued by the model in evaluation of a configured function tool, that represents a function invocation needed for a subsequent chat completions request to resolve.
  • Constructor Details

    • ChatCompletionsFunctionToolCall

      public ChatCompletionsFunctionToolCall(String id, FunctionCall function)
      Creates an instance of ChatCompletionsFunctionToolCall class.
      Parameters:
      id - the id value to set.
      function - the function value to set.
  • Method Details

    • getType

      public String getType()
      Get the type property: The object type.
      Overrides:
      getType in class ChatCompletionsToolCall
      Returns:
      the type value.
    • getFunction

      public FunctionCall getFunction()
      Get the function property: The details of the function invocation requested by the tool call.
      Overrides:
      getFunction in class ChatCompletionsToolCall
      Returns:
      the function value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ChatCompletionsToolCall>
      Overrides:
      toJson in class ChatCompletionsToolCall
      Throws:
      IOException
    • fromJson

      public static ChatCompletionsFunctionToolCall fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ChatCompletionsFunctionToolCall from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ChatCompletionsFunctionToolCall 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 ChatCompletionsFunctionToolCall.