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
    • serviceRegistry

      public BUILDER serviceRegistry(ServiceRegistry registry)
      Provide an explicit registry instance to use.

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

      Parameters:
      registry - service registry instance
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      If set to false (default), CoherenceEmbeddingStore will not be available even if configured.
      Parameters:
      enabled - whether CoherenceEmbeddingStore is enabled, defaults to false
      Returns:
      updated builder instance
      See Also:
    • clearNormalizeEmbeddings

      public BUILDER clearNormalizeEmbeddings()
      Clear existing value of this property.
      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 this property.
      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 this property.
      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 this property.
      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 this property.
      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 this property.
      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:
    • enabled

      public boolean enabled()
      If set to false (default), CoherenceEmbeddingStore will not be available even if configured.
      Returns:
      the enabled
    • normalizeEmbeddings

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

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

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

      public Optional<String> index()
      The index name to use.
      Returns:
      the index
    • 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:
      the dimension
    • embeddingModel

      public Optional<dev.langchain4j.model.embedding.EmbeddingModel> embeddingModel()
      The embedding model to use.
      Returns:
      the embedding model
    • 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.