[PRISM] Worker handles model_scenario tasks
lint / hygiene (push) Failing after 31s
standard / check (push) Successful in 17s

This commit is contained in:
root committed 2026-11-23 23:16:38 +03:00
1 parent c28a8e7026
commit 58cfd5b5a7
1 file changed
+2 -2
+2 -2
View File
@@ -46,7 +46,7 @@ while True:
break
task_id, kind, sid, mid = row
try:
if kind in ("model_note", "model_review"):
if kind in ("model_note", "model_review", "model_scenario"):
cur.execute("select vendor,name,role,domain from prism.models where id=%s", (mid,))
m = cur.fetchone()
if not m:
@@ -55,7 +55,7 @@ while True:
cur.execute("""select string_agg(key || '=' || coalesce(value_text,''), ', ' order by key)
from (select distinct key,value_text from prism.specs where model_id=%s limit 12) q""", (mid,))
specs = (cur.fetchone() or [""])[0] or ""
note_kind = "review" if kind == "model_review" else "positioning"
note_kind = "scenario" if kind == "model_scenario" else ("review" if kind == "model_review" else "positioning")
prompt = MODEL_PROMPT % (name, vendor, role or "unknown", domain or "unknown", specs[:800])
r = L.ask(prompt, max_tokens=250, temperature=0.2,
chain=[{"name": "qwen2.5:7b", "kind": "ollama", "timeout": 300}])