feat: Adaptervertrag mit Dienststeuerung und Version (Studio, Ollama, llama.cpp, Attrappe; #1198)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-26 15:09:14 +01:00
parent c8cb6365de
commit c24e05cd4e
7 changed files with 209 additions and 1 deletions

View File

@ -478,6 +478,23 @@ impl Engine for OllamaEngine {
}
}
async fn version(&self) -> Option<String> {
// Nur beim angeschlossenen Server: Der verwaltete läuft nur, solange ein Modell geladen ist.
if self.managed() {
return None;
}
let antwort = self
.http
.get(format!("{}/api/version", self.base_url(None)))
.timeout(Duration::from_secs(3))
.send()
.await
.ok()?;
let text = antwort.text().await.ok()?;
let json: serde_json::Value = serde_json::from_str(&text).ok()?;
json["version"].as_str().map(str::to_string)
}
fn describe(&self) -> EngineInfo {
EngineInfo {
name: "ollama".to_string(),