Class ChromaVectorStore.Builder
java.lang.Object
org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<ChromaVectorStore.Builder>
org.springframework.ai.chroma.vectorstore.ChromaVectorStore.Builder
- All Implemented Interfaces:
org.springframework.ai.vectorstore.VectorStore.Builder<ChromaVectorStore.Builder>
- Enclosing class:
- ChromaVectorStore
public static class ChromaVectorStore.Builder
extends org.springframework.ai.vectorstore.AbstractVectorStoreBuilder<ChromaVectorStore.Builder>
-
Field Summary
Fields inherited from class org.springframework.ai.vectorstore.AbstractVectorStoreBuilder
batchingStrategy, customObservationConvention, embeddingModel, observationRegistry -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theChromaVectorStoreinstance.collectionName(String collectionName) Sets the collection name.databaseName(String databaseName) Sets the database name.filterExpressionConverter(org.springframework.ai.vectorstore.filter.FilterExpressionConverter converter) Sets the filter expression converter.initializeImmediately(boolean initialize) Sets whether to initialize immediately.initializeSchema(boolean initializeSchema) Sets whether to initialize the schema.tenantName(String tenantName) Sets the tenant name.Methods inherited from class org.springframework.ai.vectorstore.AbstractVectorStoreBuilder
batchingStrategy, customObservationConvention, getBatchingStrategy, getCustomObservationConvention, getEmbeddingModel, getObservationRegistry, observationRegistry, self
-
Method Details
-
tenantName
Sets the tenant name.- Parameters:
tenantName- the name of the tenant- Returns:
- the builder instance
- Throws:
IllegalArgumentException- if collectionName is null or empty
-
databaseName
Sets the database name.- Parameters:
databaseName- the name of the database- Returns:
- the builder instance
- Throws:
IllegalArgumentException- if collectionName is null or empty
-
collectionName
Sets the collection name.- Parameters:
collectionName- the name of the collection- Returns:
- the builder instance
- Throws:
IllegalArgumentException- if collectionName is null or empty
-
initializeSchema
Sets whether to initialize the schema.- Parameters:
initializeSchema- true to initialize schema, false otherwise- Returns:
- the builder instance
-
filterExpressionConverter
public ChromaVectorStore.Builder filterExpressionConverter(org.springframework.ai.vectorstore.filter.FilterExpressionConverter converter) Sets the filter expression converter.- Parameters:
converter- the filter expression converter to use- Returns:
- the builder instance
- Throws:
IllegalArgumentException- if converter is null
-
initializeImmediately
Sets whether to initialize immediately.- Parameters:
initialize- true to initialize immediately, false otherwise- Returns:
- the builder instance
-
build
Builds theChromaVectorStoreinstance.- Returns:
- a new ChromaVectorStore instance
- Throws:
IllegalStateException- if the builder is in an invalid state
-