feat: add proper typing for api

This commit is contained in:
2026-04-10 17:41:25 +02:00
parent a22560c337
commit 562d154480
15 changed files with 656 additions and 506 deletions
+16
View File
@@ -0,0 +1,16 @@
use crate::dto::{api, ollama};
impl From<ollama::OllamaModel> for api::ModelInfo {
fn from(m: ollama::OllamaModel) -> Self {
Self {
name: m.name,
family: m.details.as_ref().and_then(|d| d.family.clone()),
parameter_size: m.details.as_ref().and_then(|d| d.parameter_size.clone()),
quantization: m
.details
.as_ref()
.and_then(|d| d.quantization_level.clone()),
}
}
}