diff --git a/aiserver.py b/aiserver.py index ae9b1f67..c8d0d1f0 100644 --- a/aiserver.py +++ b/aiserver.py @@ -657,6 +657,7 @@ logger.add(UI_2_log_history, serialize=True, colorize=True, enqueue=True, level= #logger.add("log_file_1.log", rotation="500 MB") # Automatically rotate too big file koboldai_vars = koboldai_settings.koboldai_vars(socketio) +koboldai_settings.koboldai_vars_main = koboldai_vars utils.koboldai_vars = koboldai_vars utils.socketio = socketio @@ -7992,7 +7993,7 @@ def model_info(): @require_allowed_ip @logger.catch def show_vars(): - if args.no_ui: + if args.no_ui or koboldai_vars.host: return redirect('/api/latest') json_data = {} json_data['story_settings'] = json.loads(koboldai_vars.to_json("story_settings")) diff --git a/koboldai_settings.py b/koboldai_settings.py index f447f3ee..38570783 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -37,12 +37,12 @@ def clean_var_for_emit(value): return value def process_variable_changes(socketio, classname, name, value, old_value, debug_message=None): - global multi_story + global multi_story, koboldai_vars_main if serverstarted and name != "serverstarted": transmit_time = str(datetime.datetime.now()) if debug_message is not None: print("{} {}: {} changed from {} to {}".format(debug_message, classname, name, old_value, value)) - if value != old_value: + if value != old_value and (not koboldai_vars_main.host or name not in ["horde_api_key", "privacy_password", "img_gen_api_password"]): #Get which room we'll send the messages to if multi_story: if classname != 'story':