Class LocalVecPlugin.Builder

java.lang.Object
com.google.genkit.plugins.localvec.LocalVecPlugin.Builder
Enclosing class:
LocalVecPlugin

public static class LocalVecPlugin.Builder extends Object
Builder for LocalVecPlugin.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • addStore

      public LocalVecPlugin.Builder addStore(LocalVecConfig config)
      Adds a vector store configuration.
      Parameters:
      config - the configuration
      Returns:
      this builder
    • addStore

      public LocalVecPlugin.Builder addStore(String indexName, Embedder embedder)
      Convenience method to add a store with minimal configuration using an embedder instance.
      Parameters:
      indexName - the index name
      embedder - the embedder to use
      Returns:
      this builder
    • addStore

      public LocalVecPlugin.Builder addStore(String indexName, String embedderName)
      Convenience method to add a store with minimal configuration using an embedder name. The embedder will be resolved from the registry during plugin initialization.
      Parameters:
      indexName - the index name
      embedderName - the embedder name (e.g., "openai/text-embedding-3-small")
      Returns:
      this builder
    • build

      public LocalVecPlugin build()
      Builds the plugin.
      Returns:
      the configured plugin