Xilai Dai created CAMEL-22070: --------------------------------- Summary: Chat-memory support on camel-langchain4j-chat/camel-langchain4j-tools components Key: CAMEL-22070 URL: https://issues.apache.org/jira/browse/CAMEL-22070 Project: Camel Issue Type: Improvement Components: camel-langchain4j-chat, camel-langchain4j-tools Reporter: Xilai Dai
Currently the chat with history is supported via the "chatOperation=CHAT_MULTIPLE_MESSAGES" property. Langchain4j provides chat-memory support, see [https://docs.langchain4j.dev/tutorials/chat-memory/] e.g. creating a ConversationalChain with MessageWindowChatMemory. {code:java} ChatMemory chatMemory = MessageWindowChatMemory.withMaxMessages(20); ConversationalChain chatChain = ConversationalChain.builder() .chatLanguageModel(model) .chatMemory(chatMemory) .build(); {code} Better this chat-memory support can be added into camel-langchain4j-chat and camel-langchain4j-tools components. -- This message was sent by Atlassian Jira (v8.20.10#820010)