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

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

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

    • BuilderBase

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

    • from

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

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

      public BUILDER workingQuantizedType(com.github.tjake.jlama.safetensors.DType workingQuantizedType)
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)
      Parameters:
      workingQuantizedType - DType property
      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 JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.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 JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.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 JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.authToken(java.lang.String)
      Parameters:
      authToken - String property
      Returns:
      updated builder instance
      See Also:
    • clearTemperature

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

      public BUILDER temperature(float temperature)
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.temperature(java.lang.Float)
      Parameters:
      temperature - Float property
      Returns:
      updated builder instance
      See Also:
    • clearMaxTokens

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

      public BUILDER maxTokens(int maxTokens)
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.maxTokens(java.lang.Integer)
      Parameters:
      maxTokens - Integer 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 JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.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 JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.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, JlamaStreamingChatModel will not be available even if configured.
      Returns:
      whether JlamaStreamingChatModel is enabled, defaults to true
    • workingQuantizedType

      public Optional<com.github.tjake.jlama.safetensors.DType> workingQuantizedType()
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)
      Returns:
      DType property
    • modelCachePath

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

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

      public Optional<String> authToken()
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.authToken(java.lang.String)
      Returns:
      String property
    • temperature

      public Optional<Float> temperature()
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.temperature(java.lang.Float)
      Returns:
      Float property
    • maxTokens

      public Optional<Integer> maxTokens()
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.maxTokens(java.lang.Integer)
      Returns:
      Integer property
    • threadCount

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

      public Optional<Boolean> quantizeModelAtRuntime()
      Generated from JlamaStreamingChatModel.JlamaStreamingChatModelBuilder.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