spring-projects / spring-projects/spring-ai
Message metadata should be returned when calling Chatclient.call()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Expected Behavior
When I build and invoke a ChatClient like this:
ChatClient client = ChatClient.builder(chatModel)
.defaultAdvisors(chatMemoryAdvisor, qaAdvisor)
.build();
chatClient
.prompt()
.user(question)..call()
.chatClientResponse();
I would like the ChatResponse (or a companion API) to include metadata about the memory-record insertion that just occurred in the Spring_AI_Chat_memory table—at minimum the generated record’s timestamp, and optionally any custom fields I’ve configured (e.g. trace IDs, session markers, etc.).
Current Behavior
At present,There is no way to retrieve the underlying memory‐table record’s ID, timestamp, or any additional columns I may have stored.
Context
My goal is to enable user feedback on the current message, so I need some metadata information about the current message
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ChatClient.call() and chat memory advisor flow described in the issue. Determine how the ChatResponse or a companion API could expose the inserted memory record's timestamp, ID, and configured metadata. Done means callers can retrieve metadata for the current message, including at least its timestamp, with the requested API behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100