mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #2949] Request to Limit Dialog Rounds posted to llm #28604
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fxsome on GitHub (Jun 9, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/2949
Is your feature request related to a problem? Please describe.
Some times I want to continue the dialog ,but too much token is spent. Because all history are sent to llm. I want to save some.
Describe the solution you'd like
Limit dialog rounds, provide several strategy such as :
1,only keep most recent N rounds;
2, Keep the system prompt , the first user message, and most recnet N rounds;
3.only keep first N rounds and the last user message ;
4. no limit
Additional context

LM studio provides things like the attchment pic, but it based on tokens, not chat rounds, I think dialog rounds are better.
@tjbck commented on GitHub (Jun 9, 2024):
#1268 PR Welcome!
@GrayXu commented on GitHub (Aug 1, 2024):
+1, this would be a very meaningful feature.
btw, such a feat issue might be closed as not planned?
@tjbck commented on GitHub (Aug 1, 2024):
Already implemented as Functions.
https://openwebui.com/functions
@GrayXu commented on GitHub (Aug 1, 2024):
Thanks, Functions is very cool. But I tried it out, are you referring to Max turns? This function seems to not allow further conversation after reaching the limit, which is different from OP's question. I wonder if there are other options?
If not, I will try to see how to implement a function that achieves a similar feature.
@GrayXu commented on GitHub (Aug 1, 2024):
For anyone facing similar issues, you can utilize https://github.com/GrayXu/openwebui-cut-context to achieve the proper functionality implementation.
@justinh-rahb commented on GitHub (Aug 1, 2024):
Or just use this function:
https://openwebui.com/f/hub/context_clip_filter
@mxdlzg commented on GitHub (Nov 4, 2024):
If the function runs on the server side, does it waste the bandwidth of the client?
After all, rounds can be truncated directly on the client side.