FunctionDefinition Class
- java.
lang. Object - com.
azure. ai. openai. models. FunctionDefinition
- com.
Implements
public final class FunctionDefinition
implements JsonSerializable<FunctionDefinition>
The definition of a caller-specified function that chat completions may invoke in response to matching user input.
Constructor Summary
| Constructor | Description |
|---|---|
| FunctionDefinition(String name) |
Creates an instance of Function |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Function |
fromJson(JsonReader jsonReader)
Reads an instance of Function |
| String |
getDescription()
Get the description property: A description of what the function does. |
| String |
getName()
Get the name property: The name of the function to be called. |
|
Binary |
getParameters()
Get the parameters property: The parameters the function accepts, described as a JSON Schema object. |
|
Function |
setDescription(String description)
Set the description property: A description of what the function does. |
|
Function |
setParameters(BinaryData parameters)
Set the parameters property: The parameters the function accepts, described as a JSON Schema object. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
FunctionDefinition
public FunctionDefinition(String name)
Creates an instance of FunctionDefinition class.
Parameters:
Method Details
fromJson
public static FunctionDefinition fromJson(JsonReader jsonReader)
Reads an instance of FunctionDefinition from the JsonReader.
Parameters:
Returns:
Throws:
getDescription
public String getDescription()
Get the description property: A description of what the function does. The model will use this description when selecting the function and interpreting its parameters.
Returns:
getName
public String getName()
Get the name property: The name of the function to be called.
Returns:
getParameters
public BinaryData getParameters()
Get the parameters property: The parameters the function accepts, described as a JSON Schema object.
Returns:
setDescription
public FunctionDefinition setDescription(String description)
Set the description property: A description of what the function does. The model will use this description when selecting the function and interpreting its parameters.
Parameters:
Returns:
setParameters
public FunctionDefinition setParameters(BinaryData parameters)
Set the parameters property: The parameters the function accepts, described as a JSON Schema object.
Parameters:
Returns: