1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
//! Additional model information types for Ollama API.
//!
//! Provides supplementary model structures for comprehensive information,
//! recommendations, diagnostics, and storage details.
#[ cfg( feature = "model_details" ) ]
mod private
{
use core::time::Duration;
use super::super::*;
/// Comprehensive model information
#[ derive( Debug, Clone ) ]
pub struct ComprehensiveModelInfo
{
/// Model size in bytes
pub size_bytes : u64,
/// Human-readable size format
pub size_human_readable : String,
/// Model family classification
pub family : String,
/// List of related model families
pub families : Vec< String >,
/// Parameter count as string
pub parameter_size : String,
/// Numerical parameter count
pub parameter_count : u64,
/// Model architecture type
pub architecture : String,
/// Quantization level applied
pub quantization_level : String,
/// Model file format
pub format : String,
/// List of supported features
pub supported_features : Vec< String >,
/// Context window length
pub context_length : u32,
/// Maximum sequence length
pub max_sequence_length : u32,
}
/// Model family recommendation
#[ derive( Debug, Clone ) ]
pub struct ModelRecommendation
{
/// Recommended model name
pub model_name : String,
/// Reason for recommendation
pub reason : String,
/// Similarity score (0.0-1.0)
pub similarity_score : f64,
}
/// Model lifecycle status information
#[ derive( Debug, Clone ) ]
pub struct ModelLifecycleStatus
{
/// Current lifecycle state
pub current_state : ModelLifecycle,
/// Last usage timestamp
pub last_used_at : Option< String >,
/// Duration of last loading operation
pub last_loading_duration : Option< Duration >,
/// Total usage count
pub usage_count : u64,
}
/// Model operation history entry
#[ derive( Debug, Clone ) ]
pub struct ModelOperationHistoryEntry
{
/// Type of operation performed
pub operation_type : ModelOperation,
/// Operation timestamp
pub timestamp : String,
/// Operation duration
pub duration : Duration,
}
/// Model health check result
#[ derive( Debug, Clone ) ]
pub struct ModelHealthCheck
{
/// Whether model is available
pub is_available : bool,
/// Response time for health check
pub response_time : Duration,
/// Health score (0.0-1.0)
pub health_score : f64,
/// List of identified issues
pub issues : Option< Vec< String > >,
}
/// Local model storage information
#[ derive( Debug, Clone ) ]
pub struct LocalModelStorageInfo
{
/// Total number of models stored
pub total_models : u32,
/// Total size of all models in bytes
pub total_size_bytes : u64,
/// Local storage path
pub storage_path : String,
/// Available storage space in bytes
pub available_space_bytes : u64,
}
/// Model diagnostics information
#[ derive( Debug, Clone ) ]
pub struct ModelDiagnostics
{
/// Total request count
pub request_count : u64,
}
}
#[ cfg( feature = "model_details" ) ]
crate ::mod_interface!
{
exposed use
{
ComprehensiveModelInfo,
ModelRecommendation,
ModelLifecycleStatus,
ModelOperationHistoryEntry,
ModelHealthCheck,
LocalModelStorageInfo,
ModelDiagnostics,
};
}