Find answers from the community

Updated 3 months ago

The title in sentence case is: Removing user/assistant/tool messages

At a glance

The post questions whether a certain behavior is "stupid" and suggests that it should only remove user/assistant/tool messages. The comments indicate that the community members agree the behavior should be fixed, and one community member mentions a bug in ChatMemoryBuffer that needs to be addressed. Another community member notes that the issue should not occur when using AgentRunner, but they are currently too busy to work on a fix. The community members express appreciation for the input and acknowledge that the bug should be fixed.

Isn't that kinda stupid^^ Shouldn't it only remove user/assistant/tool messages?
L
S
j
5 comments
That being said, yea it probably shouldn't 🀷 Added to my endless list of things to do lol but would apprecite a PR if its really bothering you
I also just saw that the AgentRunner is handling the system prompt separately - the issue shouldn't occur when using it. I will however consider creating a PR after my project is done πŸ™‚ Currently too much stress with finishing this application for a client.
Thanks for the input
the system prompt is not discarded. However in the past I remember seeing a bug in ChatMemoryBuffer (and some later fixes had it).When removing a message it needs to remove both assistant and tool messages, otherwise OpenAI will complain if the assistant role message required a tool, you delete the assistant message, and the tool message is orphan of it's assistant message.
Yea that bug should be fixed
Add a reply
Sign up and join the conversation on Discord