Skip to main content

Module engine

Module engine 

Source
Expand description

Running a task: the call, repairs with the exact error, votes, escalation, records.

One run is: resolve the instructions, build the request from the task’s messages and schema and its kind’s profile, reserve the call, send it, parse and check the answer. A structurally wrong answer goes back to the same model with the error, up to the profile’s repairs. Votes run concurrently and are compared with the task’s own agree; a vote without a strict majority escalates, asks or fails, as the profile says. Every call leaves a record in the scope.

Structs§

RecordPolicy
What a turn keeps of each call beyond the parsed answer.
TaskCall
Where a task call sits: its identifier, its parent, and how deep its chain already is.
TaskEngine
Runs model tasks. Cheap to clone; shared by every turn.
TaskEngineBuilder
Builds a TaskEngine.
TaskScope
The spending and the records of one phase of one turn.

Enums§

TaskFailure
Why a task produced no answer to use.
TaskOutcome
What a task run produced, and how deep its chain ended.

Constants§

TASK_LABEL
The request metadata key carrying the task id a call runs as: u2/extract#repair1.
TURN_LABEL
The request metadata key carrying the turn a call belongs to, when the scope names it.