Class JlamaChatModelConfig.BuilderBase<BUILDER extends JlamaChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JlamaChatModelConfig>
java.lang.Object
io.helidon.integrations.langchain4j.providers.jlama.JlamaChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
JlamaChatModelConfig.Builder
- Enclosing interface:
JlamaChatModelConfig
public abstract static class JlamaChatModelConfig.BuilderBase<BUILDER extends JlamaChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends JlamaChatModelConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
JlamaChatModelConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerated fromJlamaChatModel.JlamaChatModelBuilder.authToken(java.lang.String)Generated fromJlamaChatModel.JlamaChatModelBuilder.authToken(java.lang.String)Clear existing value of authToken.Clear existing value of maxTokens.Clear existing value of modelCachePath.Clear existing value of quantizeModelAtRuntime.Clear existing value of temperature.Clear existing value of threadCount.Clear existing value of workingDirectory.Clear existing value of workingQuantizedType.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).booleanenabled()If set tofalse, JlamaChatModel will not be available even if configured.enabled(boolean enabled) If set tofalse, JlamaChatModel will not be available even if configured.from(JlamaChatModelConfig prototype) Update this builder from an existing prototype instance.from(JlamaChatModelConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Generated fromJlamaChatModel.JlamaChatModelBuilder.maxTokens(java.lang.Integer)maxTokens(int maxTokens) Generated fromJlamaChatModel.JlamaChatModelBuilder.maxTokens(java.lang.Integer)Generated fromJlamaChatModel.JlamaChatModelBuilder.modelCachePath(java.nio.file.Path)modelCachePath(Path modelCachePath) Generated fromJlamaChatModel.JlamaChatModelBuilder.modelCachePath(java.nio.file.Path)Configure the model name.Configure the model name.protected voidHandles providers and decorators.Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)quantizeModelAtRuntime(boolean quantizeModelAtRuntime) Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)Service registry used to discover providers and services.serviceRegistry(ServiceRegistry serviceRegistry) Service registry used to discover providers and services.Generated fromJlamaChatModel.JlamaChatModelBuilder.temperature(java.lang.Float)temperature(float temperature) Generated fromJlamaChatModel.JlamaChatModelBuilder.temperature(java.lang.Float)Generated fromJlamaChatModel.JlamaChatModelBuilder.threadCount(java.lang.Integer)threadCount(int threadCount) Generated fromJlamaChatModel.JlamaChatModelBuilder.threadCount(java.lang.Integer)toString()protected voidValidates required properties.Generated fromJlamaChatModel.JlamaChatModelBuilder.workingDirectory(java.nio.file.Path)workingDirectory(Path workingDirectory) Generated fromJlamaChatModel.JlamaChatModelBuilder.workingDirectory(java.nio.file.Path)Optional<com.github.tjake.jlama.safetensors.DType> Generated fromJlamaChatModel.JlamaChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)workingQuantizedType(com.github.tjake.jlama.safetensors.DType workingQuantizedType) Generated fromJlamaChatModel.JlamaChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
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.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JlamaChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JlamaChatModelConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends JlamaChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JlamaChatModelConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
enabled
If set tofalse, JlamaChatModel will not be available even if configured.- Parameters:
enabled- whether JlamaChatModel is enabled, defaults totrue- Returns:
- updated builder instance
- See Also:
-
clearWorkingQuantizedType
Clear existing value of workingQuantizedType.- Returns:
- updated builder instance
- See Also:
-
workingQuantizedType
Generated fromJlamaChatModel.JlamaChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)- Parameters:
workingQuantizedType- DType property- Returns:
- updated builder instance
- See Also:
-
clearModelCachePath
Clear existing value of modelCachePath.- Returns:
- updated builder instance
- See Also:
-
modelCachePath
Generated fromJlamaChatModel.JlamaChatModelBuilder.modelCachePath(java.nio.file.Path)- Parameters:
modelCachePath- Path property- Returns:
- updated builder instance
- See Also:
-
clearWorkingDirectory
Clear existing value of workingDirectory.- Returns:
- updated builder instance
- See Also:
-
workingDirectory
Generated fromJlamaChatModel.JlamaChatModelBuilder.workingDirectory(java.nio.file.Path)- Parameters:
workingDirectory- Path property- Returns:
- updated builder instance
- See Also:
-
clearAuthToken
Clear existing value of authToken.- Returns:
- updated builder instance
- See Also:
-
authToken
Generated fromJlamaChatModel.JlamaChatModelBuilder.authToken(java.lang.String)- Parameters:
authToken- String property- Returns:
- updated builder instance
- See Also:
-
clearTemperature
Clear existing value of temperature.- Returns:
- updated builder instance
- See Also:
-
temperature
Generated fromJlamaChatModel.JlamaChatModelBuilder.temperature(java.lang.Float)- Parameters:
temperature- Float property- Returns:
- updated builder instance
- See Also:
-
clearMaxTokens
Clear existing value of maxTokens.- Returns:
- updated builder instance
- See Also:
-
maxTokens
Generated fromJlamaChatModel.JlamaChatModelBuilder.maxTokens(java.lang.Integer)- Parameters:
maxTokens- Integer property- Returns:
- updated builder instance
- See Also:
-
clearThreadCount
Clear existing value of threadCount.- Returns:
- updated builder instance
- See Also:
-
threadCount
Generated fromJlamaChatModel.JlamaChatModelBuilder.threadCount(java.lang.Integer)- Parameters:
threadCount- Integer property- Returns:
- updated builder instance
- See Also:
-
clearQuantizeModelAtRuntime
Clear existing value of quantizeModelAtRuntime.- Returns:
- updated builder instance
- See Also:
-
quantizeModelAtRuntime
Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)- Parameters:
quantizeModelAtRuntime- Boolean property- Returns:
- updated builder instance
- See Also:
-
modelName
Configure the model name.- Parameters:
modelName- model name- Returns:
- updated builder instance
- See Also:
-
serviceRegistry
Service registry used to discover providers and services. Provide an explicit registry instance to use.If not configured, the
GlobalServiceRegistrywould be used to discover services.- Parameters:
serviceRegistry- service registry to use- Returns:
- updated builder instance
- See Also:
-
enabled
public boolean enabled()If set tofalse, JlamaChatModel will not be available even if configured.- Returns:
- whether JlamaChatModel is enabled, defaults to
true
-
workingQuantizedType
Generated fromJlamaChatModel.JlamaChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)- Returns:
- DType property
-
modelCachePath
Generated fromJlamaChatModel.JlamaChatModelBuilder.modelCachePath(java.nio.file.Path)- Returns:
- Path property
-
workingDirectory
Generated fromJlamaChatModel.JlamaChatModelBuilder.workingDirectory(java.nio.file.Path)- Returns:
- Path property
-
authToken
Generated fromJlamaChatModel.JlamaChatModelBuilder.authToken(java.lang.String)- Returns:
- String property
-
temperature
Generated fromJlamaChatModel.JlamaChatModelBuilder.temperature(java.lang.Float)- Returns:
- Float property
-
maxTokens
Generated fromJlamaChatModel.JlamaChatModelBuilder.maxTokens(java.lang.Integer)- Returns:
- Integer property
-
threadCount
Generated fromJlamaChatModel.JlamaChatModelBuilder.threadCount(java.lang.Integer)- Returns:
- Integer property
-
quantizeModelAtRuntime
Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)- Returns:
- Boolean property
-
modelName
Configure the model name.- Returns:
- model name
-
serviceRegistry
Service registry used to discover providers and services. Provide an explicit registry instance to use.If not configured, the
GlobalServiceRegistrywould be used to discover services.- Returns:
- service registry to use
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)