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 Summary
ConstructorsConstructorDescriptionCreates an instance of CreateToolResourcesOptions class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CreateToolResourcesOptions
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CreateToolResourcesOptions from the JsonReader.Get the codeInterpreter property: A list of file IDs made available to the `code_interpreter` tool.Get the fileSearch property: A list of vector stores or their IDs made available to the `file_search` tool.setCodeInterpreter
(CreateCodeInterpreterToolResourceOptions codeInterpreter) Set the codeInterpreter property: A list of file IDs made available to the `code_interpreter` tool.setFileSearch
(CreateFileSearchToolResourceOptions fileSearch) Set the fileSearch property: A list of vector stores or their IDs made available to the `file_search` tool.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CreateToolResourcesOptions
public CreateToolResourcesOptions()Creates an instance of CreateToolResourcesOptions class.
-
-
Method Details
-
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
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
- Specified by:
toJson
in interfacecom.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.
-