-
Notifications
You must be signed in to change notification settings - Fork 913
Enable Setting API Key and Other Settings via Environment Variables #38
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
As this app uses local storage of the Browser to store the API-Key with key name stability-apiKey, You can set |
Thank you for your comment and explanation! And sorry my comment was not well explained. API_Key, I would like to achieve either of the above. |
I think it’s reasonable to allow API keys to be set via environment variables. 👍 Would need some small tweaks to enable that. |
@cruhl please assign this issue to me .I would love to contribute to the project. |
Would be great if the API endpoint URL could be overridden with the same method. I've got some minimal changes that get StableStudio working with gyre.ai - but it needs a different API endpoint (usually http://localhost:5000 instead of https://grpc.stability.ai but sometimes a remote server). |
If you are looking to implement settings and a different backend I would suggest creating a custom plugin. You can define values that are displayed in the settings panel of your plugin and even persist them to localStorage or a backend if you like. |
@cruhl @hafriedlander @KAJdev it's got some Docker stuff in there, too.. sorry about that :/ |
It's the same API (I've re-implemented the stability GRPC protocol), just a different endpoint URL. There are some tweaks I want to make, but it's not immediately obvious to me how to extend the plugin (rather than duplicate it for two lines of code). I'll take another look tonight. |
Is there any update on seetting the apiKey via environment variables? I've tried to do it with a localstorage.setItem("stability-apiKey") at the App component, but it seems that when the createPlugin method is called, it doesn't work, since the Dream button seems disabled. When i reload, it becomes enabled, but I don't really understand why. Has someone thought of a workaround for this? thanks in regards :) |
Thank you for releasing the OSS version of Stable Studio!!
I built it immediately, but I have one question.
How can I set the API Key in advance?
I would appreciate your answer.
The text was updated successfully, but these errors were encountered: