Add ai-21-migration module: upgrading Spring AI 2.0.x to 2.1.0, measured. One probe source tree run on 2.0.0, 2.0.2, 2.0.3 and 2.1.0 (Anthropic prompt tokens with caching, auth header, discarded temperature, thinking parts, message mutability, entity() on refusals), three compile breaks, API and configuration diffs from the jars, ChatMemory to session copy, a wrapping ToolCallingManager under tool confirmation, the OpenAI Responses switch, VectorStore.upsert on real pgvector, a grep checklist and an OpenRewrite recipe. Scripted and local fake models; no provider called. Spring Boot 4.2.0, Spring AI 2.1.0, Java 25.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# Copying a ChatMemory conversation into a session (scripted model)
|
||||
added to memory: 1 system message + 4 turns, maxMessages=5
|
||||
memory holds: system:Be brief. | user:question 3 | assistant:answer 3 | user:question 4 | assistant:answer 4
|
||||
copied: 4 messages
|
||||
copied again: 0 messages (already has events)
|
||||
session holds: user:question 3 | assistant:answer 3 | user:question 4 | assistant:answer 4
|
||||
appendMessage(system): IllegalArgumentException: Storing a SystemMessage in session 'c2' is disabled. System prompts are configuration: supply them on every request (e.g. ChatClient defaultSystem/.system, or your own prompt builder) and keep per-session settings in Session.metadata. To store system messages anyway, use DefaultSessionService.builder().allowSystemMessages(true) or set spring.ai.session.allow-system-messages=true. See the "System Messages" reference page.
|
||||
next prompt the model sees: user:question 3 | assistant:answer 3 | user:question 4 | assistant:answer 4 | user:question 5
|
||||
ChatMemory.CONVERSATION_ID = chat_memory_conversation_id
|
||||
MemoryAdvisor.CONVERSATION_ID = chat_memory_conversation_id
|
||||
Reference in New Issue
Block a user