Documentation
¶
Overview ¶
Package quota is the quota of platform AI (R11, R12; architecture 3.6): its unit, the tariffs and their caps for a family day, the typical tasks a new task of handwriting must find room for, and the reserve of a kind of call when tutor gives no expected price.
The values are the configuration of api, and a pull request changes them, as R11 has it: they are product, not deployment, and a deployment that set its own would make two platforms of one release without a word in the log. The first values are those of the tariff of the closed slice, $0.50 a profile and $1.50 an account; the estimates behind them are in architecture 3.6.
Index ¶
Constants ¶
const ( // ClosedSlice is the tariff of the closed slice, a code's by default. ClosedSlice = "closed_slice" // Probe is a tariff of a few cents a day, which the operator gives an account // to see the quota run out on a run with app (T52): room for a typical task // and a few checks after it, and no more. Probe = "probe" )
The tariffs. An account gets its tariff with its invite code (R04, R34), and the operator changes it by api tariff.
Variables ¶
This section is empty.
Functions ¶
func Tariffs ¶
func Tariffs() []string
Tariffs is every tariff, by its name, in the order of the table.
func ValidOffset ¶
ValidOffset says whether minutes is an offset of a clock from UTC that the quota takes: from −12 to +14 hours, a multiple of a quarter of an hour. Any other is ignored, and the request counts under the offset kept.
Types ¶
type Caps ¶
type Caps struct {
Profile, Account Micro
}
Caps are the caps of a tariff for a family day: of each profile, which keeps the children of one account fair to each other, and of the account, which holds what the account spends (R11).
type Clock ¶
Clock is what an account keeps of its family day: the last offset its devices sent, in minutes, if any, and its current day, if it has had one.
func (Clock) Sent ¶
Sent is the clock c after a request at now that sent the offset reported, if it sent one, and whether it changed: a valid offset is kept, for the days that begin from then on — the current day ends at its own end — and once the day kept is over, the clock keeps the day that holds now. An offset that is not valid is ignored.
type Counter ¶
type Counter struct {
Spent, Reserved Micro
}
Counter is what a counter of a family day holds: spent, and in reserve.
type Day ¶
Day is a family day: the instant it begins, the key of its counters, and the instant it ends, the first of the next.
type Micro ¶
type Micro int64
Micro is an amount of US dollars by tutor's estimate, in whole micro-dollars, as the export writes the counters (exportv1.QuotaCounter): a sum of them adds up the same in every order, which a float does not.
const ( // TypicalHandwriting is a task of handwriting: two checks and the words of a // rung and of praise. By tutor v0.1.24's expected prices, $0.0093 a check by // the pair and $0.0182 the words (Tutor.Price), it is $0.055; the first app // measured $0.014 a check (T42), and this is $0.06. TypicalHandwriting Micro = 60_000 // TypicalRubric is a task with a rubric: two readings of the essay with their // assessment, the first submission and one rewrite, ≈ $0.06 by the price of // an essay at tutor (architecture 3.4 tutor). TypicalRubric Micro = 60_000 )
The typical tasks (R11; the amendment of 2026-11-02 to it). A new task that platform AI checks begins only when what is left of the day holds one, so that the learner does not begin work nobody can read today.
func Reserve ¶
Reserve is what a call of the kind reserves before it goes: tutor's expected price, when it has one, or the value of the kind here. A page of a workbook reserves by its crops, crops of them; any other call, crops = 1.
type Spent ¶
type Spent string
Spent is why a reserve does not fit, in the words of the log's line of an exhausted quota: the cap of the profile or of the account has too little left, or the account has no tariff with caps. Fits is none: it fits.
const ( Fits Spent = "" ProfileCap Spent = "profile" AccountCap Spent = "account" NoTariff Spent = "tariff" )
The reasons a reserve does not fit.