bunsen-tool 0.43.0

bunsen's models on the command line: speech to text (Parakeet, Qwen3-ASR, Voxtral Realtime, Whisper) and who spoke when (Sortformer), text to speech (ZONOS3, Qwen3-TTS), chat (Qwen3, Qwen3.5, Gemma, nanochat) and typed decisions (Laya). The chat driver is also a library, `bunsen_tool::chat`.
Documentation
//! `chat fetch`.

use bunsen::errors::BunsenResult;
use bunsen_app::{
    cache::WeightsCacheArgs,
    logging::{
        LevelFilter,
        LogArgs,
        LogPolicy,
    },
};

use crate::chat::{
    ChatModelFamily,
    choose_checkpoint,
};

/// Fetches checkpoints into the weights cache.
#[derive(clap::Args, Debug)]
pub struct ChatFetchCommand {
    #[clap(flatten)]
    logging: LogArgs,

    #[clap(flatten)]
    cache: WeightsCacheArgs,

    /// Checkpoints, each as `--model` takes one (`list` shows the names).
    #[arg(required = true)]
    names: Vec<String>,
}

impl ChatFetchCommand {
    /// Fetches each name: `family`'s, or outside `family` its own family's.
    pub fn run(
        &self,
        family: Option<ChatModelFamily>,
    ) -> BunsenResult<()> {
        self.logging
            .init(LogPolicy::new(LevelFilter::Warn, LevelFilter::Warn))?;
        let cache = self.cache.init()?;
        for name in &self.names {
            let (family, name) =
                choose_checkpoint(family, std::slice::from_ref(name), &Default::default())?;
            family.fetch(&name, &cache)?;
        }
        Ok(())
    }
}