Skip to main content

Module dictate_models

Module dictate_models 

Source
Expand description

What this machine has downloaded from the dictation feed, and which model each role was last set to run.

App-level rather than per-project: dictation is one process-wide engine, so a model is on the machine or it is not.

Re-exportsยง

use redb::ReadableTable; ๐Ÿ”’
use redb::TableDefinition; ๐Ÿ”’
use crate::dictate::DictateRole; ๐Ÿ”’
use crate::install::ActiveChoice; ๐Ÿ”’
use crate::install::InstalledModel; ๐Ÿ”’
use super::Db; ๐Ÿ”’

Constantsยง

ACTIVE ๐Ÿ”’
One row per role, keyed by role_key: the userโ€™s last runtime pick.
INSTALLED ๐Ÿ”’
One row per installed file, keyed by file name.

Functionsยง

active
The runtime pick recorded for one role, when there is one.
clear_active
Drop one roleโ€™s runtime pick, so the role answers its config key or its compiled pin again.
installed
Every installed model, oldest first.
record_active
Record the runtime pick for one role, replacing any row for it.
record_installed
Record one installed model, replacing any row for the same file.
remove_installed
Drop one installed record, by the file it was filed under. A file with no row is not an error: the record the caller wanted gone is already gone.
role_key
The storeโ€™s own spelling of a role, stable across releases: the key a pick is filed under.