Fix couple of minor bugs in Ollama config widget

This commit is contained in:
Kovid Goyal 2025-09-28 22:05:39 +05:30
parent 7d79ffaea7
commit b71d79f5cc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 1 deletions

View File

@ -76,7 +76,10 @@ def get_available_models() -> dict[str, Model]:
def does_model_exist_locally(model_id: str) -> bool:
return model_id in get_available_models()
try:
return model_id in get_available_models()
except Exception:
return False
def config_widget():

View File

@ -36,6 +36,7 @@ class ConfigWidget(QWidget):
self.timeout_sb = t = QSpinBox(self)
t.setRange(15, 600), t.setSingleStep(1), t.setSuffix(_(' seconds'))
t.setValue(pref('timeout', 120))
l.addRow(_('&Timeout:'), t)
lm.setClearButtonEnabled(True)
lm.setToolTip(_(