How to Flush Chat History #357
Answered
by
ilvalerione
mikeburton220
asked this question in
Q&A
-
|
How do I flush chat history while a script is running? I'm running into issues where my history is "too large" and I need to flush it during my loops. I'm not sure how to do this? I see flushAll() in the chatHistoryInterface, but i'm not sure how to call it. Do I call it during my chat call? Agent::make()->chat(new UserMessage($message) |
Beta Was this translation helpful? Give feedback.
Answered by
ilvalerione
Nov 3, 2025
Replies: 1 comment 5 replies
-
|
It's an utility method to give you the ability to trigger a clean up of a thread or a user's chat if you need. You can call it from the agent instance, like this: $agent = Agent::make();
$agent->resolveChatHistory()->flushAll(); |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
mikeburton220
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's an utility method to give you the ability to trigger a clean up of a thread or a user's chat if you need. You can call it from the agent instance, like this: