Class VectorStoreFile

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

public final class VectorStoreFile extends Object implements com.azure.json.JsonSerializable<VectorStoreFile>
Description of a file attached to a vector store.
  • 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.file`.
      Returns:
      the object value.
    • getUsageBytes

      public int getUsageBytes()
      Get the usageBytes property: The total vector store usage in bytes. Note that this may be different from the original file size.
      Returns:
      the usageBytes value.
    • getCreatedAt

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

      public String getVectorStoreId()
      Get the vectorStoreId property: The ID of the vector store that the file is attached to.
      Returns:
      the vectorStoreId value.
    • getStatus

      public VectorStoreFileStatus getStatus()
      Get the status property: The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.
      Returns:
      the status value.
    • getLastError

      public VectorStoreFileError getLastError()
      Get the lastError property: The last error associated with this vector store file. Will be `null` if there are no errors.
      Returns:
      the lastError value.
    • toJson

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

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

      public VectorStoreChunkingStrategyResponse getChunkingStrategy()
      Get the chunkingStrategy property: The strategy used to chunk the file.
      Returns:
      the chunkingStrategy value.