The return value of a module's cost(input_stats, params) function. Counts
are upper bounds for one run over the given input, except calls, which is
the number of model requests expected.
Usage
hr_cost(
calls,
calls_max = calls,
tokens_in_max = 0,
tokens_out_max = 0,
embed_max = 0,
sends = list(),
batched = TRUE
)Arguments
- calls
Model requests the run is expected to make.
- calls_max
Model requests it can make at worst. Never taken as less than
callsonce costs are summed.- tokens_in_max
Prompt tokens the run sends beyond the input itself and the fixed prompt of each request: replies handed on to later merge or summary requests.
- tokens_out_max
Reply tokens the run can be billed for at worst. Zero leaves it to the pre-flight check, which prices every request at
input_stats$out_cap, the largest reply cap the run's model is sent. A module whose replies can exceed that states its own bound here, and the check uses the larger of the two.- embed_max
Requests to the embeddings endpoint.
- sends
Input every run must send, as a list of
list(tokens =, model =): a reader that sends every chunk sends at least their tokens to the model that reads them. Priced to refuse a run that cannot finish under the spending limit before it starts.NULLis the same as none.- batched
Whether requests can go out in parallel batches, which cannot be stopped part way and so are held to their worst case.