Class CreateToolResourcesOptions

java.lang.Object
com.azure.ai.openai.assistants.models.CreateToolResourcesOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<CreateToolResourcesOptions>

public final class CreateToolResourcesOptions extends Object implements com.azure.json.JsonSerializable<CreateToolResourcesOptions>
Request object. 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.
  • Constructor Details

    • CreateToolResourcesOptions

      public CreateToolResourcesOptions()
      Creates an instance of CreateToolResourcesOptions class.
  • Method Details

    • getCodeInterpreter

      public CreateCodeInterpreterToolResourceOptions getCodeInterpreter()
      Get the codeInterpreter property: A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
      Returns:
      the codeInterpreter value.
    • setCodeInterpreter

      public CreateToolResourcesOptions setCodeInterpreter(CreateCodeInterpreterToolResourceOptions codeInterpreter)
      Set the codeInterpreter property: A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
      Parameters:
      codeInterpreter - the codeInterpreter value to set.
      Returns:
      the CreateToolResourcesOptions object itself.
    • getFileSearch

      public CreateFileSearchToolResourceOptions getFileSearch()
      Get the fileSearch property: A list of vector stores or their IDs made available to the `file_search` tool.
      Returns:
      the fileSearch value.
    • setFileSearch

      Set the fileSearch property: A list of vector stores or their IDs made available to the `file_search` tool.
      Parameters:
      fileSearch - the fileSearch value to set.
      Returns:
      the CreateToolResourcesOptions object itself.
    • toJson

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

      public static CreateToolResourcesOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CreateToolResourcesOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CreateToolResourcesOptions 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 CreateToolResourcesOptions.