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

java.lang.Object
io.helidon.integrations.langchain4j.providers.coherence.CoherenceEmbeddingStoreConfig.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:
CoherenceEmbeddingStoreConfig.Builder
Enclosing interface:
CoherenceEmbeddingStoreConfig

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

    • BuilderBase

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

    • from

      public BUILDER from(CoherenceEmbeddingStoreConfig 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

      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 CoherenceEmbeddingStoreConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CoherenceEmbeddingStoreConfig>
      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 CoherenceEmbeddingStoreConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends CoherenceEmbeddingStoreConfig>
      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, CoherenceEmbeddingStore will not be available even if configured.
      Parameters:
      enabled - whether CoherenceEmbeddingStore is enabled, defaults to true
      Returns:
      updated builder instance
      See Also:
    • clearNormalizeEmbeddings

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

      public BUILDER normalizeEmbeddings(boolean normalizeEmbeddings)
      Generated from CoherenceEmbeddingStore.Builder.normalizeEmbeddings(boolean)
      Parameters:
      normalizeEmbeddings - boolean property
      Returns:
      updated builder instance
      See Also:
    • clearSession

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

      public BUILDER session(String session)
      Generated from CoherenceEmbeddingStore.Builder.session(java.lang.String)
      Parameters:
      session - String property
      Returns:
      updated builder instance
      See Also:
    • clearName

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

      public BUILDER name(String name)
      Generated from CoherenceEmbeddingStore.Builder.name(java.lang.String)
      Parameters:
      name - String property
      Returns:
      updated builder instance
      See Also:
    • clearIndex

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

      public BUILDER index(String index)
      The index name to use.
      Parameters:
      index - an Optional containing index name.
      Returns:
      updated builder instance
      See Also:
    • clearDimension

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

      public BUILDER dimension(int dimension)
      The number of dimensions in the embeddings.

      If an embedding model is configured than the model's dimensions will be used instead of this configuration.

      Parameters:
      dimension - an Optional containing number of dimensions in the embeddings.
      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(dev.langchain4j.model.embedding.EmbeddingModel embeddingModel)
      The embedding model to use.
      Parameters:
      embeddingModel - an Optional containing embedding model.
      Returns:
      updated builder instance
      See Also:
    • embeddingModelDiscoverServices

      public BUILDER embeddingModelDiscoverServices(boolean embeddingModelDiscoverServices)
      Service discovery flag for embeddingModel(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Parameters:
      embeddingModelDiscoverServices - whether to enable automatic service discovery
      Returns:
      updated builder instance
      See Also:
    • serviceRegistry

      public BUILDER serviceRegistry(ServiceRegistry serviceRegistry)
      Service registry used to discover providers and services. Provide an explicit registry instance to use.

      If not configured, the GlobalServiceRegistry would be used to discover services.

      Parameters:
      serviceRegistry - service registry to use
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      If set to false, CoherenceEmbeddingStore will not be available even if configured.
      Returns:
      whether CoherenceEmbeddingStore is enabled, defaults to true
    • normalizeEmbeddings

      public Optional<Boolean> normalizeEmbeddings()
      Generated from CoherenceEmbeddingStore.Builder.normalizeEmbeddings(boolean)
      Returns:
      boolean property
    • session

      public Optional<String> session()
      Generated from CoherenceEmbeddingStore.Builder.session(java.lang.String)
      Returns:
      String property
    • name

      public Optional<String> name()
      Generated from CoherenceEmbeddingStore.Builder.name(java.lang.String)
      Returns:
      String property
    • index

      public Optional<String> index()
      The index name to use.
      Returns:
      an Optional containing index name.
    • dimension

      public Optional<Integer> dimension()
      The number of dimensions in the embeddings.

      If an embedding model is configured than the model's dimensions will be used instead of this configuration.

      Returns:
      an Optional containing number of dimensions in the embeddings.
    • embeddingModel

      public Optional<dev.langchain4j.model.embedding.EmbeddingModel> embeddingModel()
      The embedding model to use.
      Returns:
      an Optional containing embedding model.
    • embeddingModelDiscoverServices

      public boolean embeddingModelDiscoverServices()
      Service discovery flag for embeddingModel(). If set to true, services will be discovered from Java service loader, or Helidon ServiceRegistry.
      Returns:
      whether to enable automatic service discovery
    • serviceRegistry

      public Optional<ServiceRegistry> serviceRegistry()
      Service registry used to discover providers and services. Provide an explicit registry instance to use.

      If not configured, the GlobalServiceRegistry would be used to discover services.

      Returns:
      service registry to use
    • 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