Class LangChain4jModelFactory

java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.service.model.LangChain4jModelFactory

public class LangChain4jModelFactory extends Object
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 Details

    • createModel

      public static Object createModel(String strModelClass, Map<String,Object> properties) throws Exception
      Creates a model instance using the builder pattern and reflection.
      Parameters:
      strModelClass - the fully qualified class name of the model
      properties - the properties to set on the builder
      Returns:
      the created model instance
      Throws:
      Exception - if model creation fails