Class VectorStore

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

public final class VectorStore extends Object implements com.azure.json.JsonSerializable<VectorStore>
A vector store is a collection of processed files can be used by the `file_search` tool.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of VectorStore from the JsonReader.
    Get the createdAt property: The Unix timestamp (in seconds) for when the vector store was created.
    Get the expiresAfter property: Details on when this vector store expires.
    Get the expiresAt property: The Unix timestamp (in seconds) for when the vector store will expire.
    Get the fileCounts property: Files count grouped by status processed or being processed by this vector store.
    Get the id property: The identifier, which can be referenced in API endpoints.
    Get the lastActiveAt property: The Unix timestamp (in seconds) for when the vector store was last active.
    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 name property: The name of the vector store.
    Get the object property: The object type, which is always `vector_store`.
    Get the status property: The status of the vector store, which can be either `expired`, `in_progress`, or `completed`.
    int
    Get the usageBytes property: The total number of bytes used by the files in the vector store.
    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
  • Method Details

    • getId

      public String getId()
      Get the id property: The identifier, which can be referenced in API endpoints.
      Returns:
      the id value.
    • getObject

      public String getObject()
      Get the object property: The object type, which is always `vector_store`.
      Returns:
      the object value.
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Get the createdAt property: The Unix timestamp (in seconds) for when the vector store was created.
      Returns:
      the createdAt value.
    • getName

      public String getName()
      Get the name property: The name of the vector store.
      Returns:
      the name value.
    • getUsageBytes

      public int getUsageBytes()
      Get the usageBytes property: The total number of bytes used by the files in the vector store.
      Returns:
      the usageBytes value.
    • getFileCounts

      public VectorStoreFileCount getFileCounts()
      Get the fileCounts property: Files count grouped by status processed or being processed by this vector store.
      Returns:
      the fileCounts value.
    • getStatus

      public VectorStoreStatus getStatus()
      Get the status property: The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.
      Returns:
      the status value.
    • getExpiresAfter

      public VectorStoreExpirationPolicy getExpiresAfter()
      Get the expiresAfter property: Details on when this vector store expires.
      Returns:
      the expiresAfter value.
    • getExpiresAt

      public OffsetDateTime getExpiresAt()
      Get the expiresAt property: The Unix timestamp (in seconds) for when the vector store will expire.
      Returns:
      the expiresAt value.
    • getLastActiveAt

      public OffsetDateTime getLastActiveAt()
      Get the lastActiveAt property: The Unix timestamp (in seconds) for when the vector store was last active.
      Returns:
      the lastActiveAt value.
    • 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.
    • toJson

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

      public static VectorStore fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VectorStore from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VectorStore if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the VectorStore.