[ 
https://issues.apache.org/jira/browse/CAMEL-27243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Federico Mariani resolved CAMEL-27243.
--------------------------------------
    Resolution: Fixed

> camel-spring-ai-chat - session memory with a sessionService option, and 
> deprecate chatMemory
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27243
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27243
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-ai
>            Reporter: Federico Mariani
>            Assignee: Federico Mariani
>            Priority: Major
>             Fix For: 4.24.0
>
>
> Spring AI 2.1.0 deprecates {{ChatMemory}}, {{MessageWindowChatMemory}}, 
> {{MessageChatMemoryAdvisor}} and the chat memory repositories for removal in 
> 3.0.0, in favour of session memory: {{SessionService}} and 
> {{SessionAdvisors}} ({{spring-ai-session}}, {{spring-ai-session-advisor}}), 
> an append-only event log with turn-aware compaction, and a JDBC store 
> ({{spring-ai-session-jdbc}}). {{VectorStoreChatMemoryAdvisor}}, used by the 
> {{chatMemoryVectorStore}} option, is not deprecated.
> h3. Proposal
> * A new {{sessionService}} option. The {{CamelSpringAiChatConversationId}} 
> header selects the session, as it selects the conversation today 
> ({{MemoryAdvisor.CONVERSATION_ID}} has the same value as 
> {{ChatMemory.CONVERSATION_ID}}).
> * Deprecate the {{chatMemory}} option; it keeps working until Spring AI 3.0.0.
> * A clear rule when both are set. {{chatMemory}} is autowired and the Spring 
> AI model starters create a {{ChatMemory}} bean, while a {{SessionService}} 
> bean only exists with {{spring-ai-starter-model-session-jdbc}}. Conversations 
> stored in a chat memory are not moved to a session; the documentation says so.
> * Documentation, and an upgrade guide entry for the deprecation.
> Two small changes for existing routes, in the upgrade guide: with the 
> {{CamelSpringAiChatConversationId}} header, the conversation id is now passed 
> to every memory advisor, also when the endpoint has no memory of its own; and 
> when the {{advisors}} option has a memory advisor, the endpoint adds none of 
> its own (before, an autowired {{chatMemory}} added a second one). 
> Applications that add {{spring-ai-starter-model-session-jdbc}} switch to 
> session memory, which sends the newest 20 messages by default 
> ({{sessionMessageWindow}}).
> _Claude Code on behalf of Croway_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to