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

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

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

    • BuilderBase

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

    • from

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

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

      public BUILDER modelCachePath(Path modelCachePath)
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.modelCachePath(java.nio.file.Path)
      Parameters:
      modelCachePath - Path property
      Returns:
      updated builder instance
      See Also:
    • clearWorkingDirectory

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

      public BUILDER workingDirectory(Path workingDirectory)
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.workingDirectory(java.nio.file.Path)
      Parameters:
      workingDirectory - Path property
      Returns:
      updated builder instance
      See Also:
    • clearAuthToken

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

      public BUILDER authToken(String authToken)
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.authToken(java.lang.String)
      Parameters:
      authToken - String property
      Returns:
      updated builder instance
      See Also:
    • clearPoolingType

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

      public BUILDER poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType poolingType)
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType)
      Parameters:
      poolingType - PoolingType property
      Returns:
      updated builder instance
      See Also:
    • clearThreadCount

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

      public BUILDER threadCount(int threadCount)
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.threadCount(java.lang.Integer)
      Parameters:
      threadCount - Integer property
      Returns:
      updated builder instance
      See Also:
    • clearQuantizeModelAtRuntime

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

      public BUILDER quantizeModelAtRuntime(boolean quantizeModelAtRuntime)
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)
      Parameters:
      quantizeModelAtRuntime - Boolean property
      Returns:
      updated builder instance
      See Also:
    • modelName

      public BUILDER modelName(String modelName)
      Configure the model name.
      Parameters:
      modelName - model name
      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, JlamaEmbeddingModel will not be available even if configured.
      Returns:
      whether JlamaEmbeddingModel is enabled, defaults to true
    • modelCachePath

      public Optional<Path> modelCachePath()
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.modelCachePath(java.nio.file.Path)
      Returns:
      Path property
    • workingDirectory

      public Optional<Path> workingDirectory()
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.workingDirectory(java.nio.file.Path)
      Returns:
      Path property
    • authToken

      public Optional<String> authToken()
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.authToken(java.lang.String)
      Returns:
      String property
    • poolingType

      public Optional<com.github.tjake.jlama.model.functions.Generator.PoolingType> poolingType()
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType)
      Returns:
      PoolingType property
    • threadCount

      public Optional<Integer> threadCount()
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.threadCount(java.lang.Integer)
      Returns:
      Integer property
    • quantizeModelAtRuntime

      public Optional<Boolean> quantizeModelAtRuntime()
      Generated from JlamaEmbeddingModel.JlamaEmbeddingModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)
      Returns:
      Boolean property
    • modelName

      public Optional<String> modelName()
      Configure the model name.
      Returns:
      model name
    • 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