Added Horde Mode Random username/password/hostname

This commit is contained in:
ebolam
2022-09-06 14:37:10 -04:00
parent 328712818a
commit d49c24d96b

View File

@@ -801,9 +801,11 @@ class system_settings(settings):
if value == True: if value == True:
import subprocess import subprocess
if os.path.exists('./KoboldAI-Horde/venv/scripts/python.exe'): if os.path.exists('./KoboldAI-Horde/venv/scripts/python.exe'):
import random
random.seed()
self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/scripts/python.exe', './KoboldAI-Horde/bridge.py', self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/scripts/python.exe', './KoboldAI-Horde/bridge.py',
'--username', 'new_ui_user', '--password', '3589yhusd*YT$^', '--kai_name', 'Test New UI', '--username', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--password', '{}'.format(random.randint(-1000000000000, 1000000000000)),
'--kai_url', 'http://127.0.0.1:{}'.format(self.port), '--cluster_url', "http://koboldai.net"]) '--kai_name', '{}'.format(random.randint(-1000000000000, 1000000000000)), '--kai_url', 'http://127.0.0.1:{}'.format(self.port), '--cluster_url', "http://koboldai.net"])
else: else:
self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/bin/python', './KoboldAI-Horde/bridge.py', self._horde_pid = subprocess.Popen(['./KoboldAI-Horde/venv/bin/python', './KoboldAI-Horde/bridge.py',
'--username', 'new_ui_user', '--password', '3589yhusd*YT$^', '--kai_name', 'Test New UI', '--username', 'new_ui_user', '--password', '3589yhusd*YT$^', '--kai_name', 'Test New UI',