Package com.azure.ai.openai.models
Class FunctionDefinition
java.lang.Object
com.azure.ai.openai.models.FunctionDefinition
The definition of a caller-specified function that chat completions may invoke in response to matching user input.
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionDefinition(String name) Creates an instance of FunctionDefinition class. -
Method Summary
Modifier and TypeMethodDescriptionGet the description property: A description of what the function does.getName()Get the name property: The name of the function to be called.com.azure.core.util.BinaryDataGet the parameters property: The parameters the function accepts, described as a JSON Schema object.setDescription(String description) Set the description property: A description of what the function does.setParameters(com.azure.core.util.BinaryData parameters) Set the parameters property: The parameters the function accepts, described as a JSON Schema object.
-
Constructor Details
-
FunctionDefinition
Creates an instance of FunctionDefinition class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getName
Get the name property: The name of the function to be called.- Returns:
- the name value.
-
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:
- the description value.
-
setDescription
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:
description- the description value to set.- Returns:
- the FunctionDefinition object itself.
-
getParameters
public com.azure.core.util.BinaryData getParameters()Get the parameters property: The parameters the function accepts, described as a JSON Schema object.- Returns:
- the parameters value.
-
setParameters
Set the parameters property: The parameters the function accepts, described as a JSON Schema object.- Parameters:
parameters- the parameters value to set.- Returns:
- the FunctionDefinition object itself.
-