Closed
Description
Bug description
Create a prompt with
Prompt prompt = new Prompt(messages); // list of messages including UserMessage
And set MessageChatMemoryAdvisor as an advisor.
chatClient
.prompt(prompt)
.system(systemText)
.advisors(new MessageChatMemoryAdvisor(chatMemory))
Results in an error that Content cannot be null because MessageChatMemoryAdvisor is looking for userText() which is not present but the prompt already has the UserMessage in list of messages.
Environment
Spring AI 1.0.0-SNAPSHOT
SpringBoot 3.4.2
Java 21