mellea.backends.types
Useful type definitions for models, formatters, and backends.
Classes
ModelOption
A type that wraps around model options.
Uses sentinel values (wrapped by @@@) to provide backend and model-agnostic keys for common model options.
Create a dictionary containing model options like this:
replace_keys
options
replaced with the corresponding value for that key in from_to
.
- Any key with value == None is treated the same as the key missing.
-
If the destination key already exists in
options
, the original value is kept in the output. -
Regardless of the presence of the destination key in
options
, the source key is always absent in the output.
- Notice that “M1” keeps the original value “m1”, rather than “v1”.
- Notice that both “k1” and “k2” are absent in the output.