Class AssistantThreadCreationOptions
java.lang.Object
com.azure.ai.openai.assistants.models.AssistantThreadCreationOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AssistantThreadCreationOptions>
public final class AssistantThreadCreationOptions
extends Object
implements com.azure.json.JsonSerializable<AssistantThreadCreationOptions>
The details used to create a new assistant thread.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AssistantThreadCreationOptions class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AssistantThreadCreationOptions from the JsonReader.Get the messages property: The initial messages to associate with the new thread.Get the metadata property: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format.Get the toolResources property: A set of resources that are made available to the assistant's tools in this thread.setMessages
(List<ThreadMessageOptions> messages) Set the messages property: The initial messages to associate with the new thread.setMetadata
(Map<String, String> metadata) Set the metadata property: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format.setToolResources
(CreateToolResourcesOptions toolResources) Set the toolResources property: A set of resources that are made available to the assistant's tools in this thread.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
-
AssistantThreadCreationOptions
public AssistantThreadCreationOptions()Creates an instance of AssistantThreadCreationOptions class.
-
-
Method Details
-
getMessages
Get the messages property: The initial messages to associate with the new thread.- Returns:
- the messages value.
-
setMessages
Set the messages property: The initial messages to associate with the new thread.- Parameters:
messages
- the messages value to set.- Returns:
- the AssistantThreadCreationOptions object itself.
-
getMetadata
Get the metadata property: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.- Returns:
- the metadata value.
-
setMetadata
Set the metadata property: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.- Parameters:
metadata
- the metadata value to set.- Returns:
- the AssistantThreadCreationOptions object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<AssistantThreadCreationOptions>
- Throws:
IOException
-
fromJson
public static AssistantThreadCreationOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AssistantThreadCreationOptions from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AssistantThreadCreationOptions 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 AssistantThreadCreationOptions.
-
getToolResources
Get the toolResources property: A set of resources that are made available to the assistant's tools in this thread. 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.- Returns:
- the toolResources value.
-
setToolResources
Set the toolResources property: A set of resources that are made available to the assistant's tools in this thread. 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.- Parameters:
toolResources
- the toolResources value to set.- Returns:
- the AssistantThreadCreationOptions object itself.
-