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

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

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

    • BuilderBase

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

    • from

      public BUILDER from(InMemoryEmbeddingStoreConfig 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 InMemoryEmbeddingStoreConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InMemoryEmbeddingStoreConfig>
      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 InMemoryEmbeddingStoreConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends InMemoryEmbeddingStoreConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      Whether this embedding store component is enabled.

      If set to false, the component will be disabled even if configured.

      Parameters:
      enabled - true if the component should be enabled; false otherwise
      Returns:
      updated builder instance
      See Also:
    • clearFromFile

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

      public BUILDER fromFile(Path fromFile)
      Path to a JSON file used to initialize the in-memory embedding store via InMemoryEmbeddingStore.fromFile.

      If configured, the implementation may read the file and import previously persisted embeddings/segments into the store during startup/initialization; if not configured, the store starts empty.

      Parameters:
      fromFile - path to the JSON file, if configured
      Returns:
      updated builder instance
      See Also:
    • enabled

      public boolean enabled()
      Whether this embedding store component is enabled.

      If set to false, the component will be disabled even if configured.

      Returns:
      true if the component should be enabled; false otherwise
    • fromFile

      public Optional<Path> fromFile()
      Path to a JSON file used to initialize the in-memory embedding store via InMemoryEmbeddingStore.fromFile.

      If configured, the implementation may read the file and import previously persisted embeddings/segments into the store during startup/initialization; if not configured, the store starts empty.

      Returns:
      path to the JSON file, 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