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

java.lang.Object
io.helidon.integrations.langchain4j.ContentRetrieverConfig.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>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
ContentRetrieverConfig.Builder
Enclosing interface:
ContentRetrieverConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(ContentRetrieverConfig prototype)
      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

      public BUILDER from(ContentRetrieverConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      @Deprecated 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 ContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ContentRetrieverConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      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 ContentRetrieverConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ContentRetrieverConfig>
      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, component will be disabled even if configured.
      Parameters:
      enabled - whether the component should be enabled
      Returns:
      updated builder instance
      See Also:
    • type

      public BUILDER type(ContentRetrieverType type)
      Type of content retriever to create.
      Parameters:
      type - the content retriever type
      Returns:
      updated builder instance
      See Also:
    • embeddingStore

      public BUILDER embeddingStore(String embeddingStore)
      Embedding store to use in the content retriever.

      The value identifies a named service that provides embedding store implementation used to retrieve relevant content.

      Parameters:
      embeddingStore - the embedding store service name
      Returns:
      updated builder instance
      See Also:
    • clearEmbeddingModel

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

      public BUILDER embeddingModel(String embeddingModel)
      Explicit embedding model to use in the content retriever.

      If empty, the default embedding model is used (as resolved by the service registry). If set, the value identifies a named service that provides embedding model bean.

      Parameters:
      embeddingModel - embedding model reference if configured
      Returns:
      updated builder instance
      See Also:
    • clearDisplayName

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

      public BUILDER displayName(String displayName)
      Display name for this content retriever configuration.
      Parameters:
      displayName - the display name if configured
      Returns:
      updated builder instance
      See Also:
    • clearMaxResults

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

      public BUILDER maxResults(int maxResults)
      Maximum number of results to return from the retriever.

      If empty, the retriever implementation default is used.

      Parameters:
      maxResults - maximum results if configured
      Returns:
      updated builder instance
      See Also:
    • clearMinScore

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

      public BUILDER minScore(double minScore)
      Minimum score threshold for retrieved results.

      If empty, the retriever implementation default is used.

      Parameters:
      minScore - minimum score if configured
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      If set to false, component will be disabled even if configured.
      Returns:
      whether the component should be enabled
    • type

      public ContentRetrieverType type()
      Type of content retriever to create.
      Returns:
      the content retriever type
    • embeddingStore

      public Optional<String> embeddingStore()
      Embedding store to use in the content retriever.

      The value identifies a named service that provides embedding store implementation used to retrieve relevant content.

      Returns:
      the embedding store service name
    • embeddingModel

      public Optional<String> embeddingModel()
      Explicit embedding model to use in the content retriever.

      If empty, the default embedding model is used (as resolved by the service registry). If set, the value identifies a named service that provides embedding model bean.

      Returns:
      embedding model reference if configured
    • displayName

      public Optional<String> displayName()
      Display name for this content retriever configuration.
      Returns:
      the display name if configured
    • maxResults

      public Optional<Integer> maxResults()
      Maximum number of results to return from the retriever.

      If empty, the retriever implementation default is used.

      Returns:
      maximum results if configured
    • minScore

      public Optional<Double> minScore()
      Minimum score threshold for retrieved results.

      If empty, the retriever implementation default is used.

      Returns:
      minimum score if 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.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance