FunctionTool Class
- java.
lang. Object - com.
azure. ai. agents. models. Tool - com.
azure. ai. agents. models. FunctionTool
- com.
- com.
public final class FunctionTool
extends Tool
Function Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).
Constructor Summary
| Constructor | Description |
|---|---|
| FunctionTool(String name, Map<String,BinaryData> parameters, Boolean strict) |
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: The description property. |
| String |
getName()
Get the name property: The name of the function to call. |
|
Map<String,Binary |
getParameters()
Get the parameters property: The parameters property. |
|
Tool |
getType()
Get the type property: The type property. |
| Boolean |
isDeferLoading()
Get the defer |
| Boolean |
isStrict()
Get the strict property: The strict property. |
|
Function |
setDeferLoading(Boolean deferLoading)
Set the defer |
|
Function |
setDescription(String description)
Set the description property: The description property. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from Tool
Methods inherited from java.lang.Object
Constructor Details
FunctionTool
public FunctionTool(String name, Map<String,BinaryData> parameters, Boolean strict)
Creates an instance of FunctionTool class.
Parameters:
Method Details
fromJson
public static FunctionTool fromJson(JsonReader jsonReader)
Reads an instance of FunctionTool from the JsonReader.
Parameters:
Returns:
Throws:
getDescription
public String getDescription()
Get the description property: The description property.
Returns:
getName
public String getName()
Get the name property: The name of the function to call.
Returns:
getParameters
public Map<String,BinaryData> getParameters()
Get the parameters property: The parameters property.
Returns:
getType
public ToolType getType()
Get the type property: The type property.
Overrides:
FunctionTool.getType()Returns:
isDeferLoading
public Boolean isDeferLoading()
Get the deferLoading property: Whether this function is deferred and loaded via tool search.
Returns:
isStrict
public Boolean isStrict()
Get the strict property: The strict property.
Returns:
setDeferLoading
public FunctionTool setDeferLoading(Boolean deferLoading)
Set the deferLoading property: Whether this function is deferred and loaded via tool search.
Parameters:
Returns:
setDescription
public FunctionTool setDescription(String description)
Set the description property: The description property.
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
FunctionTool.toJson(JsonWriter jsonWriter)Parameters:
Throws: