Init tokenizer in consciousness binary main

The consciousness binary has its own main() separate from poc-memory.
Agent::new() creates ContextEntries which need the tokenizer, so it
must be initialized before Mind::new().

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-08 11:55:32 -04:00
parent f458af6dec
commit cb64cdf5fe

View file

@ -522,6 +522,13 @@ pub enum SubCmd {
#[tokio::main] #[tokio::main]
pub async fn main() { pub async fn main() {
// Initialize the Qwen tokenizer for direct token generation
let tokenizer_path = dirs::home_dir().unwrap_or_default()
.join(".consciousness/tokenizer-qwen35.json");
if tokenizer_path.exists() {
crate::agent::tokenizer::init(&tokenizer_path.to_string_lossy());
}
let cli = CliArgs::parse(); let cli = CliArgs::parse();
if cli.show_config { if cli.show_config {