Skip to content

server: public: move default parameters to its own file #6858

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

Closed
wants to merge 2 commits into from

Conversation

xatier
Copy link

@xatier xatier commented Apr 24, 2024

This commit enables users to easily update the parameters with desired default values without getting familiar with frontend details.


Hi @ggerganov, very simple change, this commit allows users to configure and experiment with different parameters without patching the index.html each time. I found it super helpful for my workflow (by swapping different params.js files).

@ngxson
Copy link
Collaborator

ngxson commented Apr 24, 2024

If you add a new file to public directory, it's better to also embed it into compiled cpp file. Else, the frontend won't work if it's standalone binary.

@xatier
Copy link
Author

xatier commented Apr 24, 2024

@ngxson sorry, I'm not familiar with the code base, how do I do that?

@xatier
Copy link
Author

xatier commented Apr 25, 2024

@ngxson never mind, found #6661 and followed the pattern, thanks for pointing this out.

@xatier
Copy link
Author

xatier commented Apr 26, 2024

rebase.

xatier added 2 commits April 27, 2024 21:58
This commit enables users to easily update the parameters with desired
default values without getting familiar with frontend details.
@xatier
Copy link
Author

xatier commented Apr 28, 2024

rebase.

@ngxson
Copy link
Collaborator

ngxson commented Apr 28, 2024

This commit enables users to easily update the parameters with desired default values without getting familiar with frontend details.

Sorry earlier I misunderstood your intent.

I don't get how it will be easier for users without any knowledge about frontend details. You new js file is already part of frontend.

Also I don't think many users want to change default params. At worst, we can implement a mechanism to save the params into localStorage to prevent it from being reset when user reload the page. But anw, I don't think it's needed for now; users who have problem with this part can always open an issue.

@ngxson ngxson added the demo Demonstrate some concept or idea, not intended to be merged label Apr 28, 2024
@xatier
Copy link
Author

xatier commented Apr 28, 2024

@ngxson, I believe it's way easier for people to update values with my proposed params.js, even if they have limited JS knowledge. I kept it as minimal dictionaries with key-value pairs. People can also simply swap out the file if they need different parameters for different models (which is quite common in my workflow testing different LLMs).

Before my change, if one needs to update default values, they either need to do that on the UI each time, or try to decipher the complex index.html, locate these two dictionaries, and make changes. The intent of this PR was to allow people to experiment with different parameters without these manual steps.

Anyway, if you don't find it necessary, I can close the PR.

@xatier xatier closed this Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo Demonstrate some concept or idea, not intended to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants