Quick fix local instance

This commit is contained in:
jeffser 2024-05-28 10:29:22 -06:00
parent a94d1dfc92
commit a9663b45fc
3 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,3 @@
ru
es
pt_BR
pt_BR

View File

@ -21,3 +21,7 @@ def stop():
if instance: instance.kill()
print("Stopped Alpaca's Ollama instance")
def reset(data_dir):
stop()
sleep(1)
start(data_dir)

View File

@ -787,8 +787,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
if self.run_remote:
dialogs.reconnect_remote(self)
else:
local_instance.stop()
local_instance.start(self.data_dir)
local_instance.reset(self.data_dir)
self.show_toast("error", 7, self.main_overlay)
def connection_switched(self):