feat: add proper typing for api
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::errors::OllamaError;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct OllamaModels {
|
||||
pub models: Vec<OllamaModel>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct OllamaModel {
|
||||
pub name: String,
|
||||
|
||||
pub details: Option<OllamaModelDetails>,
|
||||
|
||||
pub size: Option<u64>,
|
||||
pub digest: Option<String>,
|
||||
pub modified_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct OllamaModelDetails {
|
||||
pub family: Option<String>,
|
||||
pub parameter_size: Option<String>,
|
||||
pub quantization_level: Option<String>,
|
||||
}
|
||||
Reference in New Issue
Block a user