Class OllamaChatModelFactory
java.lang.Object
io.helidon.integrations.langchain4j.providers.ollama.OllamaChatModelFactory
- All Implemented Interfaces:
Service.ServicesFactory<dev.langchain4j.model.ollama.OllamaChatModel>
@Singleton
@Named("*")
public class OllamaChatModelFactory
extends Object
implements Service.ServicesFactory<dev.langchain4j.model.ollama.OllamaChatModel>
Factory for a configured
OllamaChatModel
.- See Also:
-
Field Summary
Fields inherited from interface io.helidon.service.registry.Service.ServicesFactory
TYPE
-
Method Summary
Modifier and TypeMethodDescriptionstatic dev.langchain4j.model.ollama.OllamaChatModel
create
(OllamaChatModelConfig config) Create the Ollama model from its configuration.List
<Service.QualifiedInstance<dev.langchain4j.model.ollama.OllamaChatModel>> services()
List of service instances.
-
Method Details
-
create
Create the Ollama model from its configuration.- Parameters:
config
- configuration to use- Returns:
- a new model instance
- Throws:
IllegalStateException
- in case the configuration is not enabled
-
services
Description copied from interface:Service.ServicesFactory
List of service instances. Each instance may have a different set of qualifiers.The following is inherited from this factory:
- Set of contracts, except for
Service.ServicesFactory
- Scope
- Run level
- Weight
- Specified by:
services
in interfaceService.ServicesFactory<dev.langchain4j.model.ollama.OllamaChatModel>
- Returns:
- qualified suppliers of service instances
- Set of contracts, except for
-