mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-09-29 15:31:08 -04:00
Fix couple of minor bugs in Ollama config widget
This commit is contained in:
parent
7d79ffaea7
commit
b71d79f5cc
@ -76,7 +76,10 @@ def get_available_models() -> dict[str, Model]:
|
|||||||
|
|
||||||
|
|
||||||
def does_model_exist_locally(model_id: str) -> bool:
|
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():
|
def config_widget():
|
||||||
|
@ -36,6 +36,7 @@ class ConfigWidget(QWidget):
|
|||||||
self.timeout_sb = t = QSpinBox(self)
|
self.timeout_sb = t = QSpinBox(self)
|
||||||
t.setRange(15, 600), t.setSingleStep(1), t.setSuffix(_(' seconds'))
|
t.setRange(15, 600), t.setSingleStep(1), t.setSuffix(_(' seconds'))
|
||||||
t.setValue(pref('timeout', 120))
|
t.setValue(pref('timeout', 120))
|
||||||
|
l.addRow(_('&Timeout:'), t)
|
||||||
|
|
||||||
lm.setClearButtonEnabled(True)
|
lm.setClearButtonEnabled(True)
|
||||||
lm.setToolTip(_(
|
lm.setToolTip(_(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user