Class ChatCompletionsToolDefinition

java.lang.Object
com.azure.ai.openai.models.ChatCompletionsToolDefinition
All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatCompletionsToolDefinition>
Direct Known Subclasses:
ChatCompletionsFunctionToolDefinition

public class ChatCompletionsToolDefinition extends Object implements com.azure.json.JsonSerializable<ChatCompletionsToolDefinition>
An abstract representation of a tool that can be used by the model to improve a chat completions response.
  • Constructor Details

    • ChatCompletionsToolDefinition

      public ChatCompletionsToolDefinition()
      Creates an instance of ChatCompletionsToolDefinition class.
  • Method Details

    • getType

      public String getType()
      Get the type property: The object type.
      Returns:
      the type value.
    • toJson

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

      public static ChatCompletionsToolDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ChatCompletionsToolDefinition from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ChatCompletionsToolDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ChatCompletionsToolDefinition.