← back to Exo
Add toggle to show only models downloaded locally
d084dbe5740b7520fd295da5169bff09ed2ad26a · 2025-02-01 23:45:19 -0800 · Rodionov Pavel
Files touched
M exo/tinychat/index.htmlM exo/tinychat/index.js
Diff
commit d084dbe5740b7520fd295da5169bff09ed2ad26a
Author: Rodionov Pavel <55975500+pavel-rodionov@users.noreply.github.com>
Date: Sat Feb 1 23:45:19 2025 -0800
Add toggle to show only models downloaded locally
---
exo/tinychat/index.html | 6 ++++++
exo/tinychat/index.js | 9 ++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/exo/tinychat/index.html b/exo/tinychat/index.html
index b7025a34..65451068 100644
--- a/exo/tinychat/index.html
+++ b/exo/tinychat/index.html
@@ -43,6 +43,12 @@
</div>
<h2 class="megrim-regular" style="margin-bottom: 20px;">Models</h2>
+ <div style="display: flex; align-items: center; margin-bottom: 10px;">
+ <label style="margin-right: 5px;">
+ <input type="checkbox" x-model="showDownloadedOnly" style="margin-right: 5px;">
+ Downloaded only
+ </label>
+ </div>
<!-- Loading indicator -->
<div class="loading-container" x-show="Object.keys(models).length === 0">
diff --git a/exo/tinychat/index.js b/exo/tinychat/index.js
index c3887667..5b39e64a 100644
--- a/exo/tinychat/index.js
+++ b/exo/tinychat/index.js
@@ -39,6 +39,9 @@ document.addEventListener("alpine:init", () => {
// Add models state alongside existing state
models: {},
+ // Show only models available locally
+ showDownloadedOnly: false,
+
topology: null,
topologyInterval: null,
@@ -686,7 +689,11 @@ document.addEventListener("alpine:init", () => {
// Update the existing groupModelsByPrefix method to include counts
groupModelsByPrefix(models) {
const groups = {};
- Object.entries(models).forEach(([key, model]) => {
+ const filteredModels = this.showDownloadedOnly ?
+ Object.fromEntries(Object.entries(models).filter(([, model]) => model.downloaded)) :
+ models;
+
+ Object.entries(filteredModels).forEach(([key, model]) => {
const parts = key.split('-');
const mainPrefix = parts[0].toUpperCase();
← 72329ba9 patch for manual discovery, set known_peers
·
back to Exo
·
remove tenacity dependency, implement simple retry logic ins 5157d80a →