Class EmbeddingStoreContentRetrieverConfig.BuilderBase<BUILDER extends EmbeddingStoreContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends EmbeddingStoreContentRetrieverConfig>

java.lang.Object
io.helidon.integrations.langchain4j.EmbeddingStoreContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
EmbeddingStoreContentRetrieverConfig.Builder
Enclosing interface:
EmbeddingStoreContentRetrieverConfig

public abstract static class EmbeddingStoreContentRetrieverConfig.BuilderBase<BUILDER extends EmbeddingStoreContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends EmbeddingStoreContentRetrieverConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for EmbeddingStoreContentRetrieverConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends EmbeddingStoreContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends EmbeddingStoreContentRetrieverConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      If set to false, embedding store content retriever will be disabled even if configured.
      Parameters:
      enabled - whether the content retriever should be enabled
      Returns:
      updated builder instance
      See Also:
    • embeddingStore

      public BUILDER embeddingStore(dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment> embeddingStore)
      Embedding store to use in the content retriever.
      Parameters:
      embeddingStore - an Optional containing the embedding store
      Returns:
      updated builder instance
      See Also:
    • clearEmbeddingModel

      public BUILDER clearEmbeddingModel()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • embeddingModel

      public BUILDER embeddingModel(dev.langchain4j.model.embedding.EmbeddingModel embeddingModel)
      Explicit embedding model to use in the content retriever.
      Parameters:
      embeddingModel - an Optional containing the embedding model bean name or "discovery:auto" if the bean must be discovered automatically
      Returns:
      updated builder instance
      See Also:
    • clearDisplayName

      public BUILDER clearDisplayName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • displayName

      public BUILDER displayName(String displayName)
      The display name.
      Parameters:
      displayName - an Optional containing the display name if set, otherwise an empty Optional
      Returns:
      updated builder instance
      See Also:
    • clearMaxResults

      public BUILDER clearMaxResults()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxResults

      public BUILDER maxResults(int maxResults)
      The maximum number of results.
      Parameters:
      maxResults - an Optional containing the maximum results if set, otherwise an empty Optional
      Returns:
      updated builder instance
      See Also:
    • clearMinScore

      public BUILDER clearMinScore()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • minScore

      public BUILDER minScore(double minScore)
      The minimum score threshold.
      Parameters:
      minScore - an Optional containing the minimum score if set, otherwise an empty Optional
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      If set to false, embedding store content retriever will be disabled even if configured.
      Returns:
      the enabled
    • embeddingStore

      public Optional<dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment>> embeddingStore()
      Embedding store to use in the content retriever.
      Returns:
      the embedding store
    • embeddingModel

      public Optional<dev.langchain4j.model.embedding.EmbeddingModel> embeddingModel()
      Explicit embedding model to use in the content retriever.
      Returns:
      the embedding model
    • displayName

      public Optional<String> displayName()
      The display name.
      Returns:
      the display name
    • maxResults

      public Optional<Integer> maxResults()
      The maximum number of results.
      Returns:
      the max results
    • minScore

      public Optional<Double> minScore()
      The minimum score threshold.
      Returns:
      the min score
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.