Tool Class

  • java.lang.Object
    • com.azure.ai.agents.models.Tool

Implements

public class Tool
implements JsonSerializable<Tool>

A tool that can be used to generate a response.

Constructor Summary

Constructor Description
Tool()

Creates an instance of Tool class.

Method Summary

Modifier and Type Method and Description
static Tool fromJson(JsonReader jsonReader)

Reads an instance of Tool from the JsonReader.

ToolType getType()

Get the type property: The type property.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

Tool

public Tool()

Creates an instance of Tool class.

Method Details

fromJson

public static Tool fromJson(JsonReader jsonReader)

Reads an instance of Tool from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Tool 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 Tool.

getType

public ToolType getType()

Get the type property: The type property.

Returns:

the type value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to