mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Added Horde Mode Random username/password/hostname
This commit is contained in:
@@ -801,13 +801,15 @@ 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', '{}'.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:
|
||||||
if self._horde_pid is not None:
|
if self._horde_pid is not None:
|
||||||
print("kill bridge")
|
print("kill bridge")
|
||||||
|
Reference in New Issue
Block a user