Uses of Interface
dev.langchain4j.memory.ChatMemory
Packages that use ChatMemory
Package
Description
-
Uses of ChatMemory in dev.langchain4j.chain
Methods in dev.langchain4j.chain with parameters of type ChatMemoryModifier and TypeMethodDescriptionConversationalChain.ConversationalChainBuilder.chatMemory
(ChatMemory chatMemory) ConversationalRetrievalChain.Builder.chatMemory
(ChatMemory chatMemory) Constructors in dev.langchain4j.chain with parameters of type ChatMemoryModifierConstructorDescriptionConversationalRetrievalChain
(ChatLanguageModel chatLanguageModel, ChatMemory chatMemory, ContentRetriever contentRetriever) ConversationalRetrievalChain
(ChatLanguageModel chatLanguageModel, ChatMemory chatMemory, RetrievalAugmentor retrievalAugmentor) -
Uses of ChatMemory in dev.langchain4j.memory.chat
Classes in dev.langchain4j.memory.chat that implement ChatMemoryModifier and TypeClassDescriptionclass
This chat memory operates as a sliding window ofMessageWindowChatMemory.maxMessages
messages.class
This chat memory operates as a sliding window ofTokenWindowChatMemory.maxTokens
tokens.Methods in dev.langchain4j.memory.chat that return ChatMemory -
Uses of ChatMemory in dev.langchain4j.service
Methods in dev.langchain4j.service that return ChatMemoryModifier and TypeMethodDescriptionChatMemoryAccess.getChatMemory
(Object memoryId) Returns theChatMemory
with the given id for this AI service or null if such memory doesn't exist.Methods in dev.langchain4j.service with parameters of type ChatMemoryModifier and TypeMethodDescriptionAiServices.chatMemory
(ChatMemory chatMemory) Configures the chat memory that will be used to preserve conversation history between method calls.void
AiServiceContext.initChatMemories
(ChatMemory chatMemory) -
Uses of ChatMemory in dev.langchain4j.service.memory
Methods in dev.langchain4j.service.memory that return ChatMemoryModifier and TypeMethodDescriptionChatMemoryService.evictChatMemory
(Object memoryId) ChatMemoryService.getChatMemory
(Object memoryId) ChatMemoryService.getOrCreateChatMemory
(Object memoryId) Methods in dev.langchain4j.service.memory that return types with arguments of type ChatMemoryConstructors in dev.langchain4j.service.memory with parameters of type ChatMemory -
Uses of ChatMemory in dev.langchain4j.service.tool
Methods in dev.langchain4j.service.tool with parameters of type ChatMemoryModifier and TypeMethodDescriptionToolService.executeInferenceAndToolsLoop
(ChatResponse chatResponse, ChatRequestParameters parameters, List<ChatMessage> messages, ChatLanguageModel chatModel, ChatMemory chatMemory, Object memoryId, Map<String, ToolExecutor> toolExecutors)