Replace all instances of the legacy product names "Kon" and "Corbie" with "Magnotia" across user-facing copy, code identifiers, package names, bundle ids, file paths, and documentation. Preserves the unrelated "konsole" (KDE terminal) reference and the parent CORBEL company name. - Renames 10 Rust crates (kon-* → magnotia-*) and the tauri binary - Updates package.json, tauri.conf.json (productName + identifier) - Renames CSS classes (kon-rh-* → magnotia-rh-*) and animations - Renames brand and roadmap docs - Regenerates Cargo.lock and package-lock.json Verified: svelte-check passes; pure-rust crates compile under new names.
63 lines
1.8 KiB
Rust
63 lines
1.8 KiB
Rust
//! Smoke test: load a GGUF model and exercise the high-level wrappers.
|
|
//!
|
|
//! Verified against llama-cpp-2 `0.1.144` using:
|
|
//! - `llama_backend::LlamaBackend`
|
|
//! - `model::LlamaModel`
|
|
//! - `context::params::LlamaContextParams`
|
|
//! - `sampling::LlamaSampler`
|
|
//!
|
|
//! The test is gated behind `MAGNOTIA_LLM_TEST_MODEL`.
|
|
|
|
use std::env;
|
|
use std::path::PathBuf;
|
|
|
|
use magnotia_llm::LlmEngine;
|
|
use magnotia_llm::LlmModelId;
|
|
|
|
#[test]
|
|
fn llama_cpp_2_smoke_generates_and_wraps() {
|
|
let model_path = match env::var("MAGNOTIA_LLM_TEST_MODEL") {
|
|
Ok(path) => PathBuf::from(path),
|
|
Err(_) => {
|
|
eprintln!("MAGNOTIA_LLM_TEST_MODEL not set — skipping");
|
|
return;
|
|
}
|
|
};
|
|
|
|
let engine = LlmEngine::new();
|
|
engine
|
|
.load_model(LlmModelId::Qwen3_1_7B_Q4, &model_path, true)
|
|
.expect("load model");
|
|
|
|
let completion = engine
|
|
.generate(
|
|
"Write exactly one short greeting.",
|
|
&magnotia_llm::GenerationConfig {
|
|
max_tokens: 32,
|
|
temperature: 0.0,
|
|
stop_sequences: vec!["\n".to_string()],
|
|
grammar: None,
|
|
},
|
|
)
|
|
.expect("generate");
|
|
assert!(!completion.trim().is_empty());
|
|
|
|
let cleaned = engine
|
|
.cleanup_text(
|
|
"You are a transcript cleanup assistant. Remove fillers and output only cleaned text.",
|
|
"um hello there like general kenobi",
|
|
)
|
|
.expect("cleanup_text");
|
|
assert!(!cleaned.trim().is_empty());
|
|
|
|
let tasks = engine
|
|
.extract_tasks("I need to call the plumber tomorrow and buy milk.")
|
|
.expect("extract_tasks");
|
|
assert!(!tasks.is_empty());
|
|
|
|
let steps = engine
|
|
.decompose_task("Plan a weekend trip to the coast")
|
|
.expect("decompose_task");
|
|
assert!((3..=7).contains(&steps.len()));
|
|
}
|