Class ChromaCollectionConfig.Builder

java.lang.Object
com.google.genkit.plugins.chroma.ChromaCollectionConfig.Builder
Enclosing class:
ChromaCollectionConfig

public static final class ChromaCollectionConfig.Builder extends Object
  • Method Details

    • collectionName

      public ChromaCollectionConfig.Builder collectionName(String collectionName)
      Sets the collection name.
      Parameters:
      collectionName - the collection name
      Returns:
      this builder
    • embedderName

      public ChromaCollectionConfig.Builder embedderName(String 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

      public ChromaCollectionConfig.Builder addAdditionalMetadata(String key, Object value)
      Adds a metadata entry merged into every indexed document.
      Parameters:
      key - the metadata key
      value - the metadata value
      Returns:
      this builder
    • build

      public ChromaCollectionConfig build()
      Builds a new ChromaCollectionConfig.
      Returns:
      a new config instance