aboutsummaryrefslogtreecommitdiffstats
path: root/test_llamachat.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_llamachat.py')
-rwxr-xr-xtest_llamachat.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test_llamachat.py b/test_llamachat.py
index 18b6f0a..98776b8 100755
--- a/test_llamachat.py
+++ b/test_llamachat.py
@@ -646,6 +646,7 @@ def test_sidebar_toggle():
from llamachat import backend as _backend
from llamachat import config as _config
+ from llamachat import models as _models
from llamachat.ui import ChatWindow
app = QApplication.instance() or QApplication([])
@@ -660,10 +661,11 @@ def test_sidebar_toggle():
assert cfg.state_path.parent == Path(tmp), cfg.state_path
history = db.History(cfg.db_path)
- client = _backend.Client(cfg.base_url)
+ client = _backend.MultiClient(cfg.providers, cfg.request_timeout)
presets = _config.parse_presets(cfg.presets_path)
+ store = _models.ModelStore(cfg.models_path)
- window = ChatWindow(cfg, history, client, presets)
+ window = ChatWindow(cfg, history, client, presets, store)
window.resize(1000, 700)
# The shortcut must be registered on the window itself.
@@ -704,7 +706,7 @@ def test_sidebar_toggle():
# Hidden state and width must come back on the next start.
window.sidebar_button.setChecked(False)
window._save_layout()
- restored = ChatWindow(cfg, history, client, presets)
+ restored = ChatWindow(cfg, history, client, presets, store)
assert not restored.sidebar_button.isChecked()
assert restored.sidebar_width == 333, restored.sidebar_width
@@ -723,6 +725,7 @@ def test_shortcuts():
from llamachat import backend as _backend
from llamachat import config as _config
+ from llamachat import models as _models
from llamachat.ui import ChatWindow
app = QApplication.instance() or QApplication([])
@@ -735,8 +738,9 @@ def test_shortcuts():
window = ChatWindow(
cfg,
history,
- _backend.Client(cfg.base_url),
+ _backend.MultiClient(cfg.providers, cfg.request_timeout),
_config.parse_presets(cfg.presets_path),
+ _models.ModelStore(cfg.models_path),
)
window.resize(1000, 700)
window.show()