FunctionDefinition Class

  • java.lang.Object
    • com.azure.ai.agents.persistent.models.FunctionDefinition

Implements

public final class FunctionDefinition
implements JsonSerializable<FunctionDefinition>

The input definition information for a function.

Constructor Summary

Constructor Description
FunctionDefinition(String name, BinaryData parameters)

Creates an instance of FunctionDefinition class.

Method Summary

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

Reads an instance of FunctionDefinition from the JsonReader.

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.

String getName()

Get the name property: The name of the function to be called.

BinaryData getParameters()

Get the parameters property: The parameters the functions accepts, described as a JSON Schema object.

FunctionDefinition 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.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

FunctionDefinition

public FunctionDefinition(String name, BinaryData parameters)

Creates an instance of FunctionDefinition class.

Parameters:

name - the name value to set.
parameters - the parameters value to set.

Method Details

fromJson

public static FunctionDefinition fromJson(JsonReader jsonReader)

Reads an instance of FunctionDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FunctionDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

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.

getName

public String getName()

Get the name property: The name of the function to be called.

Returns:

the name value.

getParameters

public BinaryData getParameters()

Get the parameters property: The parameters the functions accepts, described as a JSON Schema object.

Returns:

the parameters value.

setDescription

public FunctionDefinition 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 FunctionDefinition object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to