obsidian-textgenerator-plugin
obsidian-textgenerator-plugin copied to clipboard
[Bug] API cannot be saved correctly when using custom LLM
The API used is very long, and I'm not sure if that's what's causing the issue.
more details please to reproduce the issue
I believe that only three things are needed to reproduce this issue:
- Use a custom LLM provider
- Use a long api key
- Restart obsidian
Same issue here. Even when saving the profile, the key is not there on restart. Re-importing the profile also doesnt import the key.
+1,i also meet this issue
I can confirm that custom provider API keys do not survive a restart of Obsidian or a plugin reload. (Also tested with 0.7.19-beta)
Update with workaround:
- Make sure your key(s) are in place and work.
- Under "Text Generator Options" in the settings for Textgenerator there is a toggle for "Keys encryption". Toggle this option on.
- After adding or changing a key, toggle above option off and then on again to update the keys on disk.
https://github.com/nhaouari/obsidian-textgenerator-plugin/commit/2031843f0653c0fbe79911f329acfa16319b634d (included in release 0.7.27+) seems to have fixed this issue, at least for me.
This just happened to me in 0.7.28.
- Using Azure OpenAI Chat with the following parameters filled: Api key, Endpoint, Deployment name, API version.
- Confirmed working yesterday.
- Computer put to sleep overnight (plugin not reloaded manually and Obsidian was not shutdown).
- Today all parameters are gone.