Class WeaviateCollectionConfig.Builder

java.lang.Object
com.google.genkit.plugins.weaviate.WeaviateCollectionConfig.Builder
Enclosing class:
WeaviateCollectionConfig

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

    • Builder

      public Builder()
  • Method Details

    • name

      Sets the collection name.
      Parameters:
      name - the collection name
      Returns:
      this builder
    • label

      Sets the collection label for display.
      Parameters:
      label - the display label
      Returns:
      this builder
    • contentField

      public WeaviateCollectionConfig.Builder contentField(String contentField)
      Sets the field name for document content.
      Parameters:
      contentField - the content field name
      Returns:
      this builder
    • metadataField

      public WeaviateCollectionConfig.Builder metadataField(String metadataField)
      Sets the field name for document metadata.
      Parameters:
      metadataField - the metadata field name
      Returns:
      this builder
    • distanceMeasure

      Sets the distance measure for similarity search.
      Parameters:
      distanceMeasure - the distance measure
      Returns:
      this builder
    • embedder

      public WeaviateCollectionConfig.Builder embedder(Embedder embedder)
      Sets the embedder instance directly.
      Parameters:
      embedder - the embedder
      Returns:
      this builder
    • embedderName

      public WeaviateCollectionConfig.Builder embedderName(String embedderName)
      Sets the embedder name to resolve from registry.
      Parameters:
      embedderName - the embedder name (e.g., "googleai/text-embedding-004")
      Returns:
      this builder
    • defaultLimit

      public WeaviateCollectionConfig.Builder defaultLimit(int defaultLimit)
      Sets the default limit for retrieval.
      Parameters:
      defaultLimit - the default limit
      Returns:
      this builder
    • createCollectionIfMissing

      public WeaviateCollectionConfig.Builder createCollectionIfMissing(boolean createCollectionIfMissing)
      Sets whether to create the collection if it doesn't exist.
      Parameters:
      createCollectionIfMissing - true to create if missing
      Returns:
      this builder
    • vectorDimension

      public WeaviateCollectionConfig.Builder vectorDimension(int vectorDimension)
      Sets the vector dimension for the collection.
      Parameters:
      vectorDimension - the vector dimension
      Returns:
      this builder
    • build

      public WeaviateCollectionConfig build()
      Builds the WeaviateCollectionConfig.
      Returns:
      the config