Class LangChain4jModelFactory
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.service.model.LangChain4jModelFactory
Factory for creating LangChain4j model instances using the builder pattern. This factory dynamically creates model instances by invoking builder methods and
setting properties via reflection.
-
Method Summary
-
Method Details
-
createModel
public static Object createModel(String strModelClass, Map<String, Object> properties) throws ExceptionCreates a model instance using the builder pattern and reflection.- Parameters:
strModelClass- the fully qualified class name of the modelproperties- the properties to set on the builder- Returns:
- the created model instance
- Throws:
Exception- if model creation fails
-