lee-b / kobold_assistant

Like ChatGPT's voice conversations with an AI, but entirely offline/private/trade-secret-friendly, using local AI models such as LLama 2 and Whisper
GNU Affero General Public License v3.0
136 stars 14 forks source link

Feature/proper config files #1

Closed lee-b closed 1 year ago

lee-b commented 1 year ago

Adds proper json-based config files, and a built-in default json config file that gets shipper with the python package.

Supports a hierarchy of config files, including the default config file, /etc/kobold_assistant/settings.json, and ~/.config/kobold_assistant/settings.json.

Automatically (attempts to) resolve config variables used as template variables within other config file entries, and errors-out if there is a cyclic dependency between config variables.

It's kind of horrible that this is using json, but pyyaml dependencies are giving me trouble right now. Will make it use YaML (with json compatibility) in future, since it supports multi-line strings (which are much more user-friendly for writing prompts etc.) and comments (which are much more developer- and user-friendly for documenting config settings).