Package com.google.genkit.plugins.chroma
Class ChromaCollectionConfig.Builder
java.lang.Object
com.google.genkit.plugins.chroma.ChromaCollectionConfig.Builder
- Enclosing class:
ChromaCollectionConfig
Builder for
ChromaCollectionConfig.-
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalMetadata(String key, Object value) Adds a metadata entry merged into every indexed document.build()Builds a newChromaCollectionConfig.collectionName(String collectionName) Sets the collection name.createCollectionIfNotExists(boolean createCollectionIfNotExists) Sets whether to create the collection on first use if it does not exist.distance(ChromaCollectionConfig.Distance distance) Sets the distance function.embedderName(String embedderName) Sets the embedder name.
-
Method Details
-
collectionName
Sets the collection name.- Parameters:
collectionName- the collection name- Returns:
- this builder
-
embedderName
Sets the embedder name.- Parameters:
embedderName- the embedder name- Returns:
- this builder
-
distance
Sets the distance function.- Parameters:
distance- the distance function- Returns:
- this builder
-
createCollectionIfNotExists
public ChromaCollectionConfig.Builder createCollectionIfNotExists(boolean createCollectionIfNotExists) Sets whether to create the collection on first use if it does not exist.- Parameters:
createCollectionIfNotExists- whether to create the collection when missing- Returns:
- this builder
-
addAdditionalMetadata
Adds a metadata entry merged into every indexed document.- Parameters:
key- the metadata keyvalue- the metadata value- Returns:
- this builder
-
build
Builds a newChromaCollectionConfig.- Returns:
- a new config instance
-