Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Tool Calls not persisted in chat memory #2101

Open
JonnySpruce opened this issue Jan 22, 2025 · 0 comments
Open

Model Tool Calls not persisted in chat memory #2101

JonnySpruce opened this issue Jan 22, 2025 · 0 comments

Comments

@JonnySpruce
Copy link

Bug description
When adding a MessageChatMemoryAdvisor to my chat client. I would expect it to persist all messages, including the tool calls that the model makes. However, when getting the final chatResponse, I can only see the user message and the final model response in the chat memory.

Environment
Java 21, SpringAI M4, InMemoryChatMemory

Steps to reproduce

  1. Create a chat client with at least one tool call and add a MessageChatMemoryAdvisor with an InMemoryChatMemory instance passed in to it.
  2. Make a user query which invokes the tool call
  3. Investigate the ChatMemory instance and see that only the user input and the model response are included in the history.

Expected behavior
I expected to also be able to see the model tool calls in the ChatHistory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant