Class VectorStoreFile
-
- All Implemented Interfaces:
public final class VectorStoreFile
A list of files attached to a vector store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
VectorStoreFile.Builder
A builder for VectorStoreFile.
public final class
VectorStoreFile.LastError
The last error associated with this vector store file. Will be
null
if there are no errors.public final class
VectorStoreFile.Status
The status of the vector store file, which can be either
in_progress
,completed
,cancelled
, orfailed
. The statuscompleted
indicates that the vector store file is ready for use.public final class
VectorStoreFile.Attributes
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
Method Summary
Modifier and Type Method Description final String
id()
The identifier, which can be referenced in API endpoints. final Long
createdAt()
The Unix timestamp (in seconds) for when the vector store file was created. final Optional<VectorStoreFile.LastError>
lastError()
The last error associated with this vector store file. final JsonValue
_object_()
The object type, which is always vector_store.file
.final VectorStoreFile.Status
status()
The status of the vector store file, which can be either in_progress
,completed
,cancelled
, orfailed
.final Long
usageBytes()
The total vector store usage in bytes. final String
vectorStoreId()
The ID of the vector store that the File is attached to. final Optional<VectorStoreFile.Attributes>
attributes()
Set of 16 key-value pairs that can be attached to an object. final Optional<FileChunkingStrategy>
chunkingStrategy()
The strategy used to chunk the file. final JsonField<String>
_id()
Returns the raw JSON value of id. final JsonField<Long>
_createdAt()
Returns the raw JSON value of createdAt. final JsonField<VectorStoreFile.LastError>
_lastError()
Returns the raw JSON value of lastError. final JsonField<VectorStoreFile.Status>
_status()
Returns the raw JSON value of status. final JsonField<Long>
_usageBytes()
Returns the raw JSON value of usageBytes. final JsonField<String>
_vectorStoreId()
Returns the raw JSON value of vectorStoreId. final JsonField<VectorStoreFile.Attributes>
_attributes()
Returns the raw JSON value of attributes. final JsonField<FileChunkingStrategy>
_chunkingStrategy()
Returns the raw JSON value of chunkingStrategy. final Map<String, JsonValue>
_additionalProperties()
final VectorStoreFile.Builder
toBuilder()
final VectorStoreFile
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static VectorStoreFile.Builder
builder()
Returns a mutable builder for constructing an instance of VectorStoreFile. -
-
Method Detail
-
createdAt
final Long createdAt()
The Unix timestamp (in seconds) for when the vector store file was created.
-
lastError
final Optional<VectorStoreFile.LastError> lastError()
The last error associated with this vector store file. Will be
null
if there are no errors.
-
_object_
final JsonValue _object_()
The object type, which is always
vector_store.file
.Expected to always return the following:
JsonValue.from("vector_store.file")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
status
final VectorStoreFile.Status status()
The status of the vector store file, which can be either
in_progress
,completed
,cancelled
, orfailed
. The statuscompleted
indicates that the vector store file is ready for use.
-
usageBytes
final Long usageBytes()
The total vector store usage in bytes. Note that this may be different from the original file size.
-
vectorStoreId
final String vectorStoreId()
The ID of the vector store that the File is attached to.
-
attributes
final Optional<VectorStoreFile.Attributes> attributes()
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
chunkingStrategy
final Optional<FileChunkingStrategy> chunkingStrategy()
The strategy used to chunk the file.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<Long> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_lastError
final JsonField<VectorStoreFile.LastError> _lastError()
Returns the raw JSON value of lastError.
Unlike lastError, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<VectorStoreFile.Status> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_usageBytes
final JsonField<Long> _usageBytes()
Returns the raw JSON value of usageBytes.
Unlike usageBytes, this method doesn't throw if the JSON field has an unexpected type.
-
_vectorStoreId
final JsonField<String> _vectorStoreId()
Returns the raw JSON value of vectorStoreId.
Unlike vectorStoreId, this method doesn't throw if the JSON field has an unexpected type.
-
_attributes
final JsonField<VectorStoreFile.Attributes> _attributes()
Returns the raw JSON value of attributes.
Unlike attributes, this method doesn't throw if the JSON field has an unexpected type.
-
_chunkingStrategy
final JsonField<FileChunkingStrategy> _chunkingStrategy()
Returns the raw JSON value of chunkingStrategy.
Unlike chunkingStrategy, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final VectorStoreFile.Builder toBuilder()
-
validate
final VectorStoreFile validate()
-
builder
final static VectorStoreFile.Builder builder()
Returns a mutable builder for constructing an instance of VectorStoreFile.
The following fields are required:
.id() .createdAt() .lastError() .status() .usageBytes() .vectorStoreId()
-
-
-
-