mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Added password transmit block when on --host mode
This commit is contained in:
@@ -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
|
#logger.add("log_file_1.log", rotation="500 MB") # Automatically rotate too big file
|
||||||
koboldai_vars = koboldai_settings.koboldai_vars(socketio)
|
koboldai_vars = koboldai_settings.koboldai_vars(socketio)
|
||||||
|
koboldai_settings.koboldai_vars_main = koboldai_vars
|
||||||
utils.koboldai_vars = koboldai_vars
|
utils.koboldai_vars = koboldai_vars
|
||||||
utils.socketio = socketio
|
utils.socketio = socketio
|
||||||
|
|
||||||
@@ -7992,7 +7993,7 @@ def model_info():
|
|||||||
@require_allowed_ip
|
@require_allowed_ip
|
||||||
@logger.catch
|
@logger.catch
|
||||||
def show_vars():
|
def show_vars():
|
||||||
if args.no_ui:
|
if args.no_ui or koboldai_vars.host:
|
||||||
return redirect('/api/latest')
|
return redirect('/api/latest')
|
||||||
json_data = {}
|
json_data = {}
|
||||||
json_data['story_settings'] = json.loads(koboldai_vars.to_json("story_settings"))
|
json_data['story_settings'] = json.loads(koboldai_vars.to_json("story_settings"))
|
||||||
|
@@ -37,12 +37,12 @@ def clean_var_for_emit(value):
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
def process_variable_changes(socketio, classname, name, value, old_value, debug_message=None):
|
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":
|
if serverstarted and name != "serverstarted":
|
||||||
transmit_time = str(datetime.datetime.now())
|
transmit_time = str(datetime.datetime.now())
|
||||||
if debug_message is not None:
|
if debug_message is not None:
|
||||||
print("{} {}: {} changed from {} to {}".format(debug_message, classname, name, old_value, value))
|
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
|
#Get which room we'll send the messages to
|
||||||
if multi_story:
|
if multi_story:
|
||||||
if classname != 'story':
|
if classname != 'story':
|
||||||
|
Reference in New Issue
Block a user