Bug description SpringAI provides a Message interface for its conversation records, which has corresponding implementation classes. For example, UserMessage is the question asked by the user, and AssistantMessage is the question answered by the large model. In these implementation classes, the content of his answers is saved in the textContent field, but there is no get method provided. Instead, a getText method is provided, which results in no content in the JSON when serialized.

Environment SpringAI 1.0.0-M6 , JDK17

Steps to reproduce

Image

Expected behavior I expect to add the getTextContent() method on top of the original one

Minimal Complete Reproducible example

Image

Image

I see that 2 pieces of data were indeed stored, but unfortunately, the specific content was not stored. That's because the textContent property in the implementation class of the org.springframework.ai.chat.messages.Message interface does not provide a get method, only a getText() method, which results in the inability to retrieve the value. Later on, I wrote a serialization and deserialization tool class (reflection) specifically for this message, which solved the problem. However, it was quite troublesome, so I decided to add a getTextContent() method directly. This would be very convenient to use, and I hope to receive a reply after seeing it. Thank you