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 Details

    • AssistantThreadCreationOptions

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

    • getMessages

      public List<ThreadMessageOptions> 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

      public Map<String,String> 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

      public AssistantThreadCreationOptions 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. 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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

      public CreateToolResourcesOptions 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

      public AssistantThreadCreationOptions setToolResources(CreateToolResourcesOptions toolResources)
      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.