Class VectorStoreFile.Builder
-
- All Implemented Interfaces:
public final class VectorStoreFile.Builder
A builder for VectorStoreFile.
-
-
Method Summary
Modifier and Type Method Description final VectorStoreFile.Builder
id(String id)
The identifier, which can be referenced in API endpoints. final VectorStoreFile.Builder
id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value. final VectorStoreFile.Builder
createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the vector store file was created. final VectorStoreFile.Builder
createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value. final VectorStoreFile.Builder
lastError(VectorStoreFile.LastError lastError)
The last error associated with this vector store file. final VectorStoreFile.Builder
lastError(Optional<VectorStoreFile.LastError> lastError)
Alias for calling Builder.lastError with lastError.orElse(null)
.final VectorStoreFile.Builder
lastError(JsonField<VectorStoreFile.LastError> lastError)
Sets Builder.lastError to an arbitrary JSON value. final VectorStoreFile.Builder
object_(JsonValue object_)
Sets the field to an arbitrary JSON value. final VectorStoreFile.Builder
status(VectorStoreFile.Status status)
The status of the vector store file, which can be either in_progress
,completed
,cancelled
, orfailed
.final VectorStoreFile.Builder
status(JsonField<VectorStoreFile.Status> status)
Sets Builder.status to an arbitrary JSON value. final VectorStoreFile.Builder
usageBytes(Long usageBytes)
The total vector store usage in bytes. final VectorStoreFile.Builder
usageBytes(JsonField<Long> usageBytes)
Sets Builder.usageBytes to an arbitrary JSON value. final VectorStoreFile.Builder
vectorStoreId(String vectorStoreId)
The ID of the vector store that the File is attached to. final VectorStoreFile.Builder
vectorStoreId(JsonField<String> vectorStoreId)
Sets Builder.vectorStoreId to an arbitrary JSON value. final VectorStoreFile.Builder
attributes(VectorStoreFile.Attributes attributes)
Set of 16 key-value pairs that can be attached to an object. final VectorStoreFile.Builder
attributes(Optional<VectorStoreFile.Attributes> attributes)
Alias for calling Builder.attributes with attributes.orElse(null)
.final VectorStoreFile.Builder
attributes(JsonField<VectorStoreFile.Attributes> attributes)
Sets Builder.attributes to an arbitrary JSON value. final VectorStoreFile.Builder
chunkingStrategy(FileChunkingStrategy chunkingStrategy)
The strategy used to chunk the file. final VectorStoreFile.Builder
chunkingStrategy(JsonField<FileChunkingStrategy> chunkingStrategy)
Sets Builder.chunkingStrategy to an arbitrary JSON value. final VectorStoreFile.Builder
chunkingStrategy(StaticFileChunkingStrategyObject static_)
Alias for calling chunkingStrategy with FileChunkingStrategy.ofStatic(static_)
.final VectorStoreFile.Builder
chunkingStrategy(OtherFileChunkingStrategyObject other)
Alias for calling chunkingStrategy with FileChunkingStrategy.ofOther(other)
.final VectorStoreFile.Builder
staticChunkingStrategy(StaticFileChunkingStrategy static_)
Alias for calling chunkingStrategy with the following: StaticFileChunkingStrategyObject.builder() .static_(static_) .build()
final VectorStoreFile.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final VectorStoreFile.Builder
putAdditionalProperty(String key, JsonValue value)
final VectorStoreFile.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final VectorStoreFile.Builder
removeAdditionalProperty(String key)
final VectorStoreFile.Builder
removeAllAdditionalProperties(Set<String> keys)
final VectorStoreFile
build()
Returns an immutable instance of VectorStoreFile. -
-
Method Detail
-
id
final VectorStoreFile.Builder id(String id)
The identifier, which can be referenced in API endpoints.
-
id
final VectorStoreFile.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
createdAt
final VectorStoreFile.Builder createdAt(Long createdAt)
The Unix timestamp (in seconds) for when the vector store file was created.
-
createdAt
final VectorStoreFile.Builder createdAt(JsonField<Long> createdAt)
Sets Builder.createdAt to an arbitrary JSON value.
You should usually call Builder.createdAt with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
lastError
final VectorStoreFile.Builder lastError(VectorStoreFile.LastError lastError)
The last error associated with this vector store file. Will be
null
if there are no errors.
-
lastError
final VectorStoreFile.Builder lastError(Optional<VectorStoreFile.LastError> lastError)
Alias for calling Builder.lastError with
lastError.orElse(null)
.
-
lastError
final VectorStoreFile.Builder lastError(JsonField<VectorStoreFile.LastError> lastError)
Sets Builder.lastError to an arbitrary JSON value.
You should usually call Builder.lastError with a well-typed LastError value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
object_
final VectorStoreFile.Builder object_(JsonValue object_)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("vector_store.file")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
status
final VectorStoreFile.Builder status(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.
-
status
final VectorStoreFile.Builder status(JsonField<VectorStoreFile.Status> status)
Sets Builder.status to an arbitrary JSON value.
You should usually call Builder.status with a well-typed Status value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
usageBytes
final VectorStoreFile.Builder usageBytes(Long usageBytes)
The total vector store usage in bytes. Note that this may be different from the original file size.
-
usageBytes
final VectorStoreFile.Builder usageBytes(JsonField<Long> usageBytes)
Sets Builder.usageBytes to an arbitrary JSON value.
You should usually call Builder.usageBytes with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
vectorStoreId
final VectorStoreFile.Builder vectorStoreId(String vectorStoreId)
The ID of the vector store that the File is attached to.
-
vectorStoreId
final VectorStoreFile.Builder vectorStoreId(JsonField<String> vectorStoreId)
Sets Builder.vectorStoreId to an arbitrary JSON value.
You should usually call Builder.vectorStoreId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
attributes
final VectorStoreFile.Builder attributes(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.
-
attributes
final VectorStoreFile.Builder attributes(Optional<VectorStoreFile.Attributes> attributes)
Alias for calling Builder.attributes with
attributes.orElse(null)
.
-
attributes
final VectorStoreFile.Builder attributes(JsonField<VectorStoreFile.Attributes> attributes)
Sets Builder.attributes to an arbitrary JSON value.
You should usually call Builder.attributes with a well-typed Attributes value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
chunkingStrategy
final VectorStoreFile.Builder chunkingStrategy(FileChunkingStrategy chunkingStrategy)
The strategy used to chunk the file.
-
chunkingStrategy
final VectorStoreFile.Builder chunkingStrategy(JsonField<FileChunkingStrategy> chunkingStrategy)
Sets Builder.chunkingStrategy to an arbitrary JSON value.
You should usually call Builder.chunkingStrategy with a well-typed FileChunkingStrategy value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
chunkingStrategy
final VectorStoreFile.Builder chunkingStrategy(StaticFileChunkingStrategyObject static_)
Alias for calling chunkingStrategy with
FileChunkingStrategy.ofStatic(static_)
.
-
chunkingStrategy
final VectorStoreFile.Builder chunkingStrategy(OtherFileChunkingStrategyObject other)
Alias for calling chunkingStrategy with
FileChunkingStrategy.ofOther(other)
.
-
staticChunkingStrategy
final VectorStoreFile.Builder staticChunkingStrategy(StaticFileChunkingStrategy static_)
Alias for calling chunkingStrategy with the following:
StaticFileChunkingStrategyObject.builder() .static_(static_) .build()
-
additionalProperties
final VectorStoreFile.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final VectorStoreFile.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final VectorStoreFile.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final VectorStoreFile.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final VectorStoreFile.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final VectorStoreFile build()
Returns an immutable instance of VectorStoreFile.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .createdAt() .lastError() .status() .usageBytes() .vectorStoreId()
-
-
-
-