Class ToolResources

java.lang.Object
com.azure.ai.openai.assistants.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 assistant'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.
  • Method Details

    • getCodeInterpreter

      public CodeInterpreterToolResource getCodeInterpreter()
      Get the codeInterpreter property: Resources to be used by the `code_interpreter tool` consisting of file IDs.
      Returns:
      the codeInterpreter value.
    • getFileSearch

      public FileSearchToolResource getFileSearch()
      Get the fileSearch property: Resources to be used by the `file_search` tool consisting of vector store IDs.
      Returns:
      the fileSearch value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ToolResources>
      Throws:
      IOException
    • fromJson

      public static ToolResources fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.