diff --git a/app/jobs/stages.py b/app/jobs/stages.py index 968f0c1..39237e8 100644 --- a/app/jobs/stages.py +++ b/app/jobs/stages.py @@ -11,11 +11,14 @@ finders ask it (`extract.extract_task`, `summarise.summarise_task`). `enrich` (reading the best roles on their own pages, `app/jobs/enrich.py`) asks no model and is on by default (`enrich.enabled`); its switch is -`stage:enrich`, set the same way through `PUT /api/stages/enrich`. +`stage:enrich`, set the same way as the others: by the Runs page +(`PUT /api/stages/enrich`) and by `app stages enrich on|off`. `describe` is what `GET /api/stages` and `app stages` show: for each stage with a switch, the model stages and `enrich`, whether it is on, where that comes from, the model it uses, and who -would answer. +would answer. The model is the one a call is made with: `agent.model` when +set, since it overrides the per-task model everywhere (`desk/modeltask.py`), +else the stage's own. """ from __future__ import annotations @@ -98,7 +101,7 @@ def describe_one(config: Config, store: Store, name: str) -> Stage: backend, said = answer(config) return Stage(name=name, on=stage_on(config, store, name), source="config" if stored(store, name) is None else "stored", - model=getattr(getattr(config, name), "model", ""), backend=backend, + model=config.agent.model or getattr(config, name).model, backend=backend, answer=said) diff --git a/app/static/jobs.js b/app/static/jobs.js index 5e04de8..4f4882b 100644 --- a/app/static/jobs.js +++ b/app/static/jobs.js @@ -109,10 +109,17 @@ ...(stage.model ? [el("span", "badge", stage.model)] : [])); row.append(name, stageSwitch(stage, () => renderStages(stages))); const sub = el("span", "sub"); - sub.append(`${DOES[stage.name]}. How deep it reads is set per search agent, under `); - const agents = el("a", "", "Search agents"); - agents.href = "/settings/agents"; - sub.append(agents, stage.source === "config" + if (stage.name === "enrich") { + /* Global, unlike the model stages: `enrich.top` and `enrich.min_score`. */ + sub.append(`${DOES[stage.name]}. How many it reads is set for every agent alike by ` + + "enrich.top and enrich.min_score in config.yaml"); + } else { + sub.append(`${DOES[stage.name]}. How deep it reads is set per search agent, under `); + const agents = el("a", "", "Search agents"); + agents.href = "/settings/agents"; + sub.append(agents); + } + sub.append(stage.source === "config" ? ". Following config.yaml until this switch is used." : "."); row.appendChild(sub);