Class ToolResources
java.lang.Object
com.azure.ai.agents.persistent.models.ToolResources
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ToolResources>
public final class ToolResources
extends Object
implements com.azure.json.JsonSerializable<ToolResources>
A set of resources that are used by the agent's tools. The resources are specific to the type of
tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search`
tool requires a list of vector store IDs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolResourcesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ToolResources from the JsonReader.Get the azureAISearch property: Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.Get the codeInterpreter property: Resources to be used by the `code_interpreter` tool consisting of file IDs.Get the fileSearch property: Resources to be used by the `file_search` tool consisting of vector store IDs.setAzureAISearch(AzureAISearchToolResource azureAISearch) Set the azureAISearch property: Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.setCodeInterpreter(CodeInterpreterToolResource codeInterpreter) Set the codeInterpreter property: Resources to be used by the `code_interpreter` tool consisting of file IDs.setFileSearch(FileSearchToolResource fileSearch) Set the fileSearch property: Resources to be used by the `file_search` tool consisting of vector store IDs.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ToolResources
public ToolResources()Creates an instance of ToolResources class.
-
-
Method Details
-
getCodeInterpreter
Get the codeInterpreter property: Resources to be used by the `code_interpreter` tool consisting of file IDs.- Returns:
- the codeInterpreter value.
-
setCodeInterpreter
Set the codeInterpreter property: Resources to be used by the `code_interpreter` tool consisting of file IDs.- Parameters:
codeInterpreter- the codeInterpreter value to set.- Returns:
- the ToolResources object itself.
-
getFileSearch
Get the fileSearch property: Resources to be used by the `file_search` tool consisting of vector store IDs.- Returns:
- the fileSearch value.
-
setFileSearch
Set the fileSearch property: Resources to be used by the `file_search` tool consisting of vector store IDs.- Parameters:
fileSearch- the fileSearch value to set.- Returns:
- the ToolResources object itself.
-
getAzureAISearch
Get the azureAISearch property: Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.- Returns:
- the azureAISearch value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ToolResources>- Throws:
IOException
-
fromJson
Reads an instance of ToolResources from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ToolResources 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 ToolResources.
-
setAzureAISearch
Set the azureAISearch property: Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.- Parameters:
azureAISearch- the azureAISearch value to set.- Returns:
- the ToolResources object itself.
-