How it works
This Coreflux LoT template lets a language model suggest setpoint changes for a curing oven without ever giving it write access. When the reject rate climbs, the broker sends the model the oven's numbers over a REST_API route. The answer is checked against a setpoint band and a largest allowed step, then waits on an approval queue topic until the named approver approves or rejects it. Only an approved proposal becomes a write to cmd/setpoint. It runs on the free Community licence.
Key features
- Works with any OpenAI-compatible chat completions API, including a local Ollama. The API key stays in the broker's secret store and is never in a topic.
- A mock model answers in the same format, so the whole flow runs with no key and no internet.
- Proposals outside the band, or with too big a step, are blocked and logged without reaching anyone.
- Decisions are accepted only from the MQTT user you name, and only for the proposal that is waiting.
- Every question, proposal, decision, connect and subscribe is written to
audit/copilot/line-2/. - It uses 12 of the 24 LoT artifacts and 1 of the 3 routes the Community licence allows.
