Federico Mariani created CAMEL-27243:
----------------------------------------
Summary: 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
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.
No behaviour changes for existing routes.
_Claude Code on behalf of Croway_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)