exoascension / vault-chat

A ChatGPT bot trained on your vault notes. Ask your AI questions about your own thoughts and ideas!
GNU General Public License v3.0
113 stars 7 forks source link

Wait for API key before initializing #8

Closed kristenbrann closed 1 year ago

kristenbrann commented 1 year ago

Before: When you first add the plugin and enable it, it immediately starts trying to index the vault even though you have not set your API key in the setting pane yet. This results in a bunch of 401s, and also interferes with your vault indexing successfully once you do input your API key.

After: If your API key is blank, or really short, don't set up anything but the setting panel. Once the API key is entered, initialize the plugin interactions.