Class ChromaCollectionConfig

java.lang.Object
com.google.genkit.plugins.chroma.ChromaCollectionConfig

public final class ChromaCollectionConfig extends Object
Configuration for a single Chroma collection managed by ChromaPlugin.

Each config registers a retriever and indexer named chroma/<collectionName>.

  • Method Details

    • getCollectionName

      public String getCollectionName()
      Returns the Chroma collection name.
      Returns:
      the collection name
    • getEmbedderName

      public String getEmbedderName()
      Returns the name of the embedder used to vectorize documents and queries.
      Returns:
      the embedder name
    • getDistance

      public ChromaCollectionConfig.Distance getDistance()
      Returns the distance function (default ChromaCollectionConfig.Distance.COSINE).
      Returns:
      the distance function
    • isCreateCollectionIfNotExists

      public boolean isCreateCollectionIfNotExists()
      Returns whether to create the collection on first use if it does not exist (default true).
      Returns:
      true if the collection should be created when missing
    • getAdditionalMetadata

      public Map<String,Object> getAdditionalMetadata()
      Returns additional metadata merged into every indexed document.
      Returns:
      the additional metadata
    • builder

      public static ChromaCollectionConfig.Builder builder()
      Creates a new builder.
      Returns:
      a new builder