-
Notifications
You must be signed in to change notification settings - Fork 11.9k
server webui easy config selection #12031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
From UX perspective, this will be confused for most users who are not very technical, as they expect all settings to be accessible from UI, not from a file. And from UI perspective, this breaks the UI on mobile and also make it feels messy. So I think we should keep this as a demo for now. If more users need this, we can rethink how to make a better UX/UI. |
Now, it's not activated when no json config file is given. Is also added prompt suggestions. |
|
… ideas * add translations packages * add translations packages * begining of translation * Check for reverse prompt by characters instead of tokens (ggml-org#292) (ggml-org#330) * Check for reverse prompt by characters instead of tokens (ggml-org#292) * Update main.cpp Wording. * Cleanup. * Remove unnecessary use of std::stringstream. --------- Co-authored-by: Johnman <tjohnman@github> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * metal : fix `ggml_metal_log` vargs (ggml-org#4373) * docs: utilize the forward slash (/) as the path separator for Unix-like systems (ggml-org#11770) * close dropdown Menu function * no export here * automatic close sidebar when choice is made (mobile UX improvement) * fix closeDropDownMenu * Translation config in Header now * Translation config in Header now * French promt example * continue translation * continue translation * change refreshing when language is selected will use first config in json file if present and if in the correct language * Add languages and translations * fix loading when no prompt from language is found * fix click on manual settings if already checked in dropdown * rename Sidebar to ConversationList, better understanding, refactor code to have all that concerns this component in the same place * rename Sidebar to ConversationList, better understanding, refactor code to have all that concerns this component in the same place * rename Sidebar to ConversationList, better understanding, refactor code to have all that concerns this component in the same place * UI improvements UX is easier to understand * json reformat * UI buttons margins * configs and language selection in appcontext, improve UI * continue translation * add favicon (no more console log errors) * start changing Setting Dialog * fix color in light/auto theme * fix color in light/auto theme * UX/UI improvements, no more drawer * code refactor * code refactor, continue translation, UX/UI improvements * fix key * format * format * loading / save presets * translations * build * embed translations * remove log * code refactor, main functions in app.context * build * fix not needed, revert * New README.md for Web UI app. * prompts renamed to presets * favicon * remove unused parameter in json preset files * add favicon (no more console logs) * new build * readme and screenshoots --------- Co-authored-by: Votre Nom <Vous@exemple.com> Co-authored-by: tjohnman <tjohnman@users.noreply.github.com> Co-authored-by: Johnman <tjohnman@github> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> Co-authored-by: Finn Voorhees <finnvoorhees@gmail.com> Co-authored-by: jason_w <jason.wang@126.com> Co-authored-by: poulphunter <>
Big changes in last commit, translations, presets, suggestions ideas, lot's of UX/UI improvements. |
import Backend from 'i18next-http-backend'; | ||
import LanguageDetector from 'i18next-browser-languagedetector'; | ||
|
||
import translationCN from './locales/cn/translation.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think i18n is something we should add right now. I did i18n in various web app product before and the maintenance cost is just too much.
For a small frontend project like this, i18n introduces too many works in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation was something that was aked to me.
It's a little weird to ask translation in an app that cannot support the language you ask translation for...
This also make sens as system prompt can be in other languages and we can see "prompt master" user that don't understand well English.
It's heavy for user who begin to use something as embed model with llamafile to have a frontend that ask them for "temperature" with no language friendly explanation.
I have no vision of the future of llama cpp and parameters, if it changes a lots.
I've just in mind that only English can be maintained (with near 0 new cost) as it's the default translation used if language translation was not found.
For costs in mind, I'm not sure that Python interpreter was needed in "small frontend" (I don't consider a ~2.5Mo app as "small frontend" by the way).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have time to review everything here. Your screenshots look good, but problems are:
- There are too many changes grouped into single PR, I cannot review all of them. Please at least break them down into smaller PRs.
- Most of the introduced functions like i18n or
questionIdeas
bring too much code into the project. Since we're currently aiming for simplicity, I don't think we should add these functions right away. If you have a look on the old webui, it actually has a lot more features compare to this, but with the cost of no one maintaining it. - The code is not very clean, i.e. still many places use
getElementById
to bypass using proper react ref or component. This will be a lot of headaches when come to managing states.
className="h-4 w-4" | ||
> | ||
<path | ||
fillRule="evenodd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've already moved to heroicons, so plain svg like this is not recommended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that task can be asked here as code was already messy with sometimes icon sometimes svg.
I think refactoring icon can be a separate task (with low priority since it have a very small impact).
By the way, I don't think it's wise to use lot's of libraries (as heroicons) for now, as it adds dependencies (libraries) vs near zero cost because index is compressed. To maintain there are lot's of other tasks to do with higher priority.
I've start doing it, but as you asked me to think about UX/UI, I've found lot's of code very messy (modal dialog in mobile was very hard, UX needs lot's of click to open/select/close something, some part of code where sometimes in an other component with no reason, "drawer" was very painful for UX).
I don't know the reason for other dev. to not maintain legacy projects (I've started to update legacy version before see that it has been replaced by a react app).
I've done states management with the help of some coffee ! I think it can be refactored in a more understandable way. I've start to use "getElementById" to bypass dropdown UX non-sense of DaisyUI, it's not React and is also lighter, I don't think I will change that as React isn't needed and is heavier for performances, for browsers. I give you this improvements but I don't think I will maintain C++ app, so it's up to you to use it or not. |
Add to webui a quick access for custom configurations (including prompt).
As asked by @xydac in an old PR, the chat prompts from https://github.com/f/awesome-chatgpt-prompts has been loaded in the config json file.