Horde parameter fixes

This commit is contained in:
Henk
2023-02-25 16:01:11 +01:00
parent 1e6e1aaa18
commit 29ceac6d43
2 changed files with 4 additions and 2 deletions

View File

@@ -1358,6 +1358,7 @@ class system_settings(settings):
if kai_name == "My Awesome Instance":
kai_name = f"KoboldAI UI Instance #{random.randint(-100000000, 100000000)}"
api_key = bridge_cd.api_key
old_api_key = bridge_cd.api_key
priority_usernames = bridge_cd.priority_usernames
except:
cluster_url = "https://horde.koboldai.net"
@@ -1365,12 +1366,13 @@ class system_settings(settings):
serve_old_api = True
kai_name = f"KoboldAI UI Instance #{random.randint(-100000000, 100000000)}"
api_key = "0000000000"
old_api_key = "0000000000"
priority_usernames = []
# Always use the local URL & port
kai_url = f'http://127.0.0.1:{self.port}'
logger.info(f"Name: {kai_name} on {kai_url}")
threading.Thread(target=self._horde_pid.bridge, args=(1, api_key, kai_name, kai_url, cluster_url, priority_usernames)).run()
threading.Thread(target=self._horde_pid.bridge, args=(1, api_key, kai_name, kai_url, cluster_url, priority_usernames, serve_old_api, old_api_url, old_api_key)).run()
else:
if self._horde_pid is not None:
logger.info("Killing Horde bridge")