Closed jonathanchourio closed 1 year ago
I'm not 100% sure whether I understand you properly, but let me take a couple of guesses:
file://
URLs don't have their own persistent storage. So once you refresh the page, you'll lose all your data (and thus need to enter your API key again). Not 100% sure how to solve this, but it may become easy when this feature reaches browsers: https://github.com/WICG/isolated-web-apps/blob/main/README.md - web bundles are basically "safe exe files for the web" - i.e. bundle a website up into a simple executable fileI've written a guide on point 2: https://github.com/josephrocca/OpenCharacters/blob/main/docs/local-setup.md
Please feel free to open another issue if I've misunderstood, or if you run into any troubles.
i was trying to set by default the ( let openAiApiKeyOriginal = (await db.misc.get("openAiApiKey"))?.value || "sk---------"; )
but then can not hide the apikey... and every time force the label promp:
let result = await prompt2({ openAiApiKey: { label: "Please create a new OpenAI API key and paste it here. Go to this page to do that. You can change or delete this later by clicking the 'settings' button.", type:"textLine" }, });
im trying to hide the default api key openAiApiKey: {label: "OpenAI API key:", type: "textLine", placeholder: "(optional)",defaultValue: openAiApiKeyOriginal, readOnly: true, hidden: true },
but not works ....woulbe interesting when you set the default apikey value do not force que promp.
its only an suggestion.! Great job! :D