mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
feat: system prompt variables (e.g. username, current datetime) #954
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 @spoutop on GitHub (May 17, 2024).
Is your feature request related to a problem? Please describe.
It would be nice if the model could personalize responses based on the current user's username. It would be more engaging and user-friendly if the model could address users by their names used when registering.
Describe the solution you'd like
I would like to pass the current username to the model's context window before sending the query so that the model can respond back with "Hi username." This would require modifying the backend to include the username in the context.
Describe alternatives you've considered
An alternative solution could be to create a middleware that intercepts the queries, inserts the username, and then forwards it to the model. Another option is to have the frontend handle username insertion before sending queries. A toggle option under Settings > Interface would be nice.
Additional context
Consideration to add more user data in the future would be nice like Age, Gender, etc for personalize responses.
@tjbck commented on GitHub (May 31, 2024):
Added to latest dev, let me know if you encounter any issues!