feat: Strata-Adapter (#1038), Release 0.1.6
Strata teilt Servercode und Protokoll mit Maya (docs/m2-strata-messung.md); MayaEngine::strata startet server.py --engine strata, behält den Arbeitsordner des Terminals, nur 127.0.0.1. Scheduler führt Strata als exklusiv. Neu: Abschnitt [strata], nexus model add --engine strata --strata-config. Auf srv04 mit echtem Strata geprüft (client2antwort.1-.3). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg3bfByVgQ9z7CGCSGc
This commit is contained in:
@ -13,6 +13,8 @@ pub const LLAMA_CPP: &str = "llama.cpp";
|
||||
pub const OLLAMA: &str = "ollama";
|
||||
/// Name der Engine-Zeile für Maya.
|
||||
pub const MAYA: &str = "maya";
|
||||
/// Name der Engine-Zeile für Strata.
|
||||
pub const STRATA: &str = "strata";
|
||||
|
||||
/// Eingabe für `register_llm`: ein Sprachmodell mit einem Startprofil.
|
||||
#[derive(Debug, Clone)]
|
||||
@ -77,9 +79,13 @@ impl Store {
|
||||
if new.gpus.is_empty() {
|
||||
return Err(Error::Db("mindestens eine GPU angeben".to_string()));
|
||||
}
|
||||
if new.engine != LLAMA_CPP && new.engine != OLLAMA && new.engine != MAYA {
|
||||
if new.engine != LLAMA_CPP
|
||||
&& new.engine != OLLAMA
|
||||
&& new.engine != MAYA
|
||||
&& new.engine != STRATA
|
||||
{
|
||||
return Err(Error::Db(format!(
|
||||
"unbekannte Engine \"{}\" (llama.cpp, ollama oder maya)",
|
||||
"unbekannte Engine \"{}\" (llama.cpp, ollama, maya oder strata)",
|
||||
new.engine
|
||||
)));
|
||||
}
|
||||
@ -428,6 +434,19 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strata_modell_hat_die_konfigurationsdatei_als_pfad_und_eigene_engine() {
|
||||
let mut store = Store::open_in_memory().unwrap();
|
||||
let mut n = neu("qwen");
|
||||
n.engine = "strata".to_string();
|
||||
n.path = PathBuf::from("/home/svc-scotty/.local/share/strata/install/strata-q2_0.json");
|
||||
n.gpus = vec![0, 1];
|
||||
store.register_llm(&n).unwrap();
|
||||
let plan = store.start_plan("qwen").unwrap().unwrap();
|
||||
assert_eq!(plan.engine_name, "strata");
|
||||
assert_eq!(plan.gpus, vec![0, 1]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unbekannte_engine_wird_abgelehnt() {
|
||||
let mut store = Store::open_in_memory().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user