Remote Copilot models (italdesign BYOK + AI credits) for shots/report
This commit is contained in:
+3
-3
@@ -309,7 +309,7 @@ def status():
|
||||
w = db.media(n)[0]; d["mb"] = round(w.stat().st_size / 1e6, 1) if w else 0
|
||||
rs.append(d)
|
||||
return {"now": t, "recs": rs, "busy": busy(), "queue": len(QUEUE),
|
||||
"llm": [llama.current(True), llama.current(False)], "llms": [[k, llama.MODELS[k][0]] for k in llama.available()]}
|
||||
"llm": [llama.current(True), llama.current(False)], "llms": [[[k, llama.label(k)] for k in llama.available(v)] for v in (True, False)]}
|
||||
|
||||
|
||||
def fts(sql, q):
|
||||
@@ -505,7 +505,7 @@ addEventListener("dragleave",e=>{if(!e.relatedTarget)document.body.classList.rem
|
||||
addEventListener("drop",e=>{e.preventDefault();document.body.classList.remove("drag");const f=e.dataTransfer.files[0];if(f)send(f)});
|
||||
async function tick(){try{const j=await (await fetch("/status")).json();ab.disabled=j.busy;ab.title=j.busy?"pipeline in corso":"";
|
||||
const runp=j.recs.map(r=>r.prog).filter(p=>p&&p.pct!=null);document.title=runp.length?`${Math.round(runp[0].pct*100)}% · ${LBL[runp[0].step]} · Riunioni`:"Riunioni";
|
||||
for(const [s,i,p] of [[llm,0,"shots: "],[llmr,1,"report: "]])if(document.activeElement!==s){s.innerHTML=j.llms.map(([k,l])=>`<option value=${k}>${p}${E(l)}`).join("");s.value=j.llm[i];s.disabled=j.busy}
|
||||
for(const [s,i,p] of [[llm,0,"shots: "],[llmr,1,"report: "]])if(document.activeElement!==s){s.innerHTML=j.llms[i].map(([k,l])=>`<option value=${k}>${p}${E(l)}`).join("");s.value=j.llm[i];s.disabled=j.busy}
|
||||
qs.textContent=j.queue?`rielaborazione: ${j.queue} da completare`:"";
|
||||
document.querySelectorAll("select[id^=f-]").forEach(s=>sel[s.id]=s.value);
|
||||
let h="<thead><tr><th>recording<th>status<th>duration<th>speakers<th>MB<th>links<th>actions</tr></thead>";
|
||||
@@ -604,7 +604,7 @@ class H(BaseHTTPRequestHandler):
|
||||
self._send(b"") if run_all(f) else self._send("rielaborazione già in corso".encode(), 409)
|
||||
elif u.path == "/llm":
|
||||
ks = [q.get("shots"), q.get("report")]
|
||||
if not all(k in llama.available() for k in ks): return self._send(b"modello non installato", 400)
|
||||
if not (ks[0] in llama.available(True) and ks[1] in llama.available(False)): return self._send(b"modello non installato", 400)
|
||||
if busy(): return self._send("pipeline in corso: cambia modello dopo".encode(), 409)
|
||||
llama.choose(*ks); self._send()
|
||||
elif u.path == "/speaker_map":
|
||||
|
||||
Reference in New Issue
Block a user