Mantella icon indicating copy to clipboard operation
Mantella copied to clipboard

Rework config values and add settings GUI

Open Leidtier opened this issue 1 year ago • 0 comments

based on #205 (so maybe integrate this into the base PR first or merge this PR instead) solves #235

Rework config values

  • complete rework of how config values work in MantellaSoftware
  • All config values are now defined in code, including:
    • ID
    • Name
    • Description
    • Value
    • Default Value
    • Constraints
    • IsHidden
    • Tags
    • OnValueChangeCallback
  • On start of the software an instance that holds the current value of each config value is generated from the definitions
  • These instances are filled gracefully by which config values can be loaded from the config.ini
  • If there is no config.ini a new one will be created from scratch
  • ConfigLoader loads the config values now from the current values. Any config value that is actually loaded can trigger a constraint violation
  • Any unsolved constraint violations will block the Mantella HTTP routes for conversation or STT from being used until resolved
  • A restart of MantellaSoftware is no longer required when changing config values from the GUI

Add settings GUI

  • Adds a browser based GUI to MantellaSoftware that uses Gradio
  • Changes the Flask server to FastAPI/uvicorn to support serving the new HTTP routes for Mantella as well as the Gradio GUI from the same app
    • No explicit test done, but the responses feel faster than with Flask

Leidtier avatar May 04 '24 14:05 Leidtier