even better checker
This commit is contained in:
parent
79a7840f24
commit
50aad8cb6d
@ -115,8 +115,9 @@ class instance():
|
|||||||
else:
|
else:
|
||||||
self.remote = True
|
self.remote = True
|
||||||
if not self.remote_url:
|
if not self.remote_url:
|
||||||
self.remote_url = 'http://0.0.0.0:11434'
|
window.remote_connection_entry.set_text('http://0.0.0.0:11434')
|
||||||
window.connection_error()
|
window.remote_connection_switch.set_sensitive(True)
|
||||||
|
window.remote_connection_switch.set_active(True)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
if self.idle_timer:
|
if self.idle_timer:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Handles UI dialogs
|
Handles UI dialogs
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import logging, requests, threading
|
import logging, requests, threading, shutil
|
||||||
from pytube import YouTube
|
from pytube import YouTube
|
||||||
from html2text import html2text
|
from html2text import html2text
|
||||||
from gi.repository import Adw, Gtk
|
from gi.repository import Adw, Gtk
|
||||||
@ -223,6 +223,7 @@ def reconnect_remote(self):
|
|||||||
extra_child=container
|
extra_child=container
|
||||||
)
|
)
|
||||||
dialog.add_response("close", _("Close Alpaca"))
|
dialog.add_response("close", _("Close Alpaca"))
|
||||||
|
if shutil.which('ollama'):
|
||||||
dialog.add_response("local", _("Use local instance"))
|
dialog.add_response("local", _("Use local instance"))
|
||||||
dialog.add_response("remote", _("Connect"))
|
dialog.add_response("remote", _("Connect"))
|
||||||
dialog.set_response_appearance("remote", Adw.ResponseAppearance.SUGGESTED)
|
dialog.set_response_appearance("remote", Adw.ResponseAppearance.SUGGESTED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user