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 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:
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.-
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 fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.authToken(java.lang.String)Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.authToken(java.lang.String)Clear existing value of authToken.Clear existing value of modelCachePath.Clear existing value of poolingType.Clear existing value of quantizeModelAtRuntime.Clear existing value of threadCount.Clear existing value of workingDirectory.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).booleanenabled()If set tofalse, JlamaEmbeddingModel will not be available even if configured.enabled(boolean enabled) If set tofalse, JlamaEmbeddingModel will not be available even if configured.from(JlamaEmbeddingModelConfig prototype) Update this builder from an existing prototype instance.from(JlamaEmbeddingModelConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.modelCachePath(java.nio.file.Path)modelCachePath(Path modelCachePath) Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.modelCachePath(java.nio.file.Path)Configure the model name.Configure the model name.Optional<com.github.tjake.jlama.model.functions.Generator.PoolingType> Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType)poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType poolingType) Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType)protected voidHandles providers and decorators.Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)quantizeModelAtRuntime(boolean quantizeModelAtRuntime) Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.quantizeModelAtRuntime(java.lang.Boolean)Service registry used to discover providers and services.serviceRegistry(ServiceRegistry serviceRegistry) Service registry used to discover providers and services.Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.threadCount(java.lang.Integer)threadCount(int threadCount) Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.threadCount(java.lang.Integer)toString()protected voidValidates required properties.Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.workingDirectory(java.nio.file.Path)workingDirectory(Path workingDirectory) Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.workingDirectory(java.nio.file.Path)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 JlamaEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JlamaEmbeddingModelConfig> - 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 JlamaEmbeddingModelConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends JlamaEmbeddingModelConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
enabled
If set tofalse, JlamaEmbeddingModel will not be available even if configured.- Parameters:
enabled- whether JlamaEmbeddingModel is enabled, defaults totrue- Returns:
- updated builder instance
- See Also:
-
clearModelCachePath
Clear existing value of modelCachePath.- Returns:
- updated builder instance
- See Also:
-
modelCachePath
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.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 fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.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 fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.authToken(java.lang.String)- Parameters:
authToken- String property- Returns:
- updated builder instance
- See Also:
-
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 fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType)- Parameters:
poolingType- PoolingType property- Returns:
- updated builder instance
- See Also:
-
clearThreadCount
Clear existing value of threadCount.- Returns:
- updated builder instance
- See Also:
-
threadCount
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.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 fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.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, JlamaEmbeddingModel will not be available even if configured.- Returns:
- whether JlamaEmbeddingModel is enabled, defaults to
true
-
modelCachePath
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.modelCachePath(java.nio.file.Path)- Returns:
- Path property
-
workingDirectory
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.workingDirectory(java.nio.file.Path)- Returns:
- Path property
-
authToken
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.authToken(java.lang.String)- Returns:
- String property
-
poolingType
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.poolingType(com.github.tjake.jlama.model.functions.Generator.PoolingType)- Returns:
- PoolingType property
-
threadCount
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.threadCount(java.lang.Integer)- Returns:
- Integer property
-
quantizeModelAtRuntime
Generated fromJlamaEmbeddingModel.JlamaEmbeddingModelBuilder.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)