mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-10 15:54:15 -05:00
Context window visualization bar #3706
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 @Master-Pr0grammer on GitHub (Feb 8, 2025).
Original feature
This is a official feature request based on this community post: https://www.reddit.com/r/OpenWebUI/comments/1ifzrv5/context_window_visualization_bar/
The feedback from the community on this idea has been very positive
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
x/max_ctx, and the bar would visually fill up as the context does, maybe it also has a green fill color when it is mostly empty, and it shifts to red when mostly full. I also propose a verbal warning notification to the user that the context window has overflown so that they are aware of the truncated context, and reduced performance.Taking it one step further
I think this concept could be taken even further, though it would require a bit more effort to implement.
With the feature of Claude's artifacts, this could be a way to dynamically manage the context window. for each artifact, we can visually show how much context it takes up, and we can give the user the ability to remove it from the context to save space. also before attaching files, it could show a preview of how much that file context it will take (or if it will use RAG it should state so). This would be extremely useful for debugging code.
NOTE: openwebUI's artifacts would need to include a list of artifacts like claude artifacts does, including user uploaded docs (non-RAG), generated markdown docs (code snippets, html, text blocks, etc)
Use case example
You are working on debugging code, and after 6 iterations, the context window has filled up. rather than starting from scratch in a new chat, and wasting time carefully and meticulously crafting a new prompt that grabs all of the relevant information discovered, you simply remove the old code iterations from the context window that are no longer relevant. reducing context window usage from 110% to 40%, saving tons of time.