Can we refresh context manually using function or API?

Hi, wanna know if we can refresh context to clear up the chat history without the user have to refresh the page. So the refresh context is triggered by certain node, function or API.

There’s a use case where goal is to clear the chat history if the user do some action (like click a button or something) it’s clearing the chat history

@EgrianoA

Just to understand the use-case better — Based on an action by a user inside the chat bot flow, you want to completely reset the bot session

Is my understanding correct?

Correct @gautham, that’s the use case we’re facing

why is this needed ? Can you dive deeper - what is the purpose of clearing chat history in middle of session?