You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
When using Gradio_UI, clicking on the "clear" button (the bin icon on the top right corner) does not reset the agent's history. This means that the only way of starting afresh is to restart the application.
Solution
This can be fixed with a single line of code placed just after after the chatbot = gr.Chatbot(...) call (currently here):
#[...]
{"left": r'$', "right": r'$', "display": False},
],
)
chatbot.clear(self.agent.memory.reset) # <--- NEW: clicking the dustbin button will clear, the agent's memory # Set up event handlerstext_input.submit(
#[...]