Annotation Interface AiService


@Service @Target(TYPE) @Retention(RUNTIME) public @interface AiService
An interface annotated with @AiService will be automatically registered as a bean and wired with all the following components (beans) available in the context:
 - ChatModel
 - StreamingChatModel
 - ChatMemory
 - ChatMemoryProvider
 - ContentRetriever
 - RetrievalAugmentor
 - All beans containing methods annotated with @Tool
 
You can also explicitly specify which components (beans) should be wired into this AI Service by setting wiringMode() to AiServiceWiringMode.EXPLICIT and specifying bean names using the following attributes:
 - chatModel()
 - streamingChatModel()
 - chatMemory()
 - chatMemoryProvider()
 - contentRetriever()
 - retrievalAugmentor()
 
See more information about AI Services here and in the Javadoc of AiServices.
See Also:
  • AiServices