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 class
Generated 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 this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Deprecated.Update builder from configuration (node of this type).boolean
enabled()
If set tofalse
(default), JlamaChatModel will not be available even if configured.enabled
(boolean enabled) If set tofalse
(default), 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 void
Handles providers and decorators.Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)
quantizeModelAtRuntime
(boolean quantizeModelAtRuntime) Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)
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 void
Validates 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, wait
Methods 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:
config
in 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:
config
in 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
(default), JlamaChatModel will not be available even if configured.- Parameters:
enabled
- whether JlamaChatModel is enabled, defaults tofalse
- Returns:
- updated builder instance
- See Also:
-
clearWorkingQuantizedType
Clear existing value of this property.- 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 this property.- 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 this property.- 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 this property.- 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 this property.- 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 this property.- 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 this property.- 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 this property.- 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:
-
enabled
public boolean enabled()If set tofalse
(default), JlamaChatModel will not be available even if configured.- Returns:
- the enabled
-
workingQuantizedType
Generated fromJlamaChatModel.JlamaChatModelBuilder.workingQuantizedType(com.github.tjake.jlama.safetensors.DType)
- Returns:
- the working quantized type
-
modelCachePath
Generated fromJlamaChatModel.JlamaChatModelBuilder.modelCachePath(java.nio.file.Path)
- Returns:
- the model cache path
-
workingDirectory
Generated fromJlamaChatModel.JlamaChatModelBuilder.workingDirectory(java.nio.file.Path)
- Returns:
- the working directory
-
authToken
Generated fromJlamaChatModel.JlamaChatModelBuilder.authToken(java.lang.String)
- Returns:
- the auth token
-
temperature
Generated fromJlamaChatModel.JlamaChatModelBuilder.temperature(java.lang.Float)
- Returns:
- the temperature
-
maxTokens
Generated fromJlamaChatModel.JlamaChatModelBuilder.maxTokens(java.lang.Integer)
- Returns:
- the max tokens
-
threadCount
Generated fromJlamaChatModel.JlamaChatModelBuilder.threadCount(java.lang.Integer)
- Returns:
- the thread count
-
quantizeModelAtRuntime
Generated fromJlamaChatModel.JlamaChatModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)
- Returns:
- the quantize model at runtime
-
modelName
Configure the model name.- Returns:
- the model name
-
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
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
config(io.helidon.config.Config)