Class AiServiceFactory

java.lang.Object
io.micronaut.langchain4j.aiservices.AiServiceFactory

@Factory public class AiServiceFactory extends Object
An AI services factory.
  • Constructor Details

    • AiServiceFactory

      public AiServiceFactory(io.micronaut.context.BeanContext beanContext, ToolRegistry toolRegistry)
  • Method Details

    • createAiServices

      @Bean protected dev.langchain4j.service.AiServices<Object> createAiServices(@Parameter AiServiceDef<Object> serviceDef)
      Creates instances of AiServices.

      A BeanCreatedEventListener can be registered to intercept creation.

      Parameters:
      serviceDef - The service definition
      Returns:
      The AI services.