Uses of Class
dev.langchain4j.service.AiServices
-
Uses of AiServices in dev.langchain4j.service
Modifier and TypeMethodDescriptionstatic <T> AiServices
<T> Begins the construction of an AI Service.AiServices.chatLanguageModel
(ChatLanguageModel chatLanguageModel) Configures chat model that will be used under the hood of the AI Service.AiServices.chatMemory
(ChatMemory chatMemory) Configures the chat memory that will be used to preserve conversation history between method calls.AiServices.chatMemoryProvider
(ChatMemoryProvider chatMemoryProvider) Configures the chat memory provider, which provides a dedicated instance ofChatMemory
for each user/conversation.AiServices.contentRetriever
(ContentRetriever contentRetriever) Configures a content retriever to be invoked on every method call for retrieving relevant content related to the user's message from an underlying data source (e.g., an embedding store in the case of anEmbeddingStoreContentRetriever
).AiServices.moderationModel
(ModerationModel moderationModel) Configures a moderation model to be used for automatic content moderation.AiServices.retrievalAugmentor
(RetrievalAugmentor retrievalAugmentor) Configures a retrieval augmentor to be invoked on every method call.AiServices.retriever
(Retriever<TextSegment> retriever) Deprecated.AiServices.streamingChatLanguageModel
(StreamingChatLanguageModel streamingChatLanguageModel) Configures streaming chat model that will be used under the hood of the AI Service.AiServices.systemMessageProvider
(Function<Object, String> systemMessageProvider) Configures the system message provider, which provides a system message to be used each time an AI service is invoked.AiServices.toolProvider
(ToolProvider toolProvider) Configures the tool provider that the LLM can useConfigures the tools that the LLM can use.Configures the tools that the LLM can use.AiServices.tools
(Map<ToolSpecification, ToolExecutor> tools) Configures the tools that the LLM can use. -
Uses of AiServices in dev.langchain4j.spi.services
Modifier and TypeMethodDescription<T> AiServices
<T> AiServicesFactory.create
(AiServiceContext context)