Skip to main content

gglib_core/request_pipeline/
mod.rs

1#![doc = include_str!("README.md")]
2pub mod apply;
3pub mod messages;
4pub mod model_context;
5pub mod resolve;
6pub mod sampling;
7pub mod truncation;
8
9pub use apply::apply;
10pub use messages::shape_messages;
11pub use model_context::ModelContext;
12pub use resolve::resolve;
13pub use sampling::{SamplingLayers, resolve_sampling};
14pub use truncation::{CHARS_PER_TOKEN_APPROX, TruncationError, TruncationReport, truncate_history};
15
16#[cfg(test)]
17mod tests_support {
18    use crate::ports::ModelSummary;
19
20    /// A minimal, inert [`ModelSummary`]. Tests set only the fields they care
21    /// about, so adding a field to `ModelSummary` doesn't touch every test.
22    pub fn summary() -> ModelSummary {
23        ModelSummary {
24            id: 7,
25            name: "qwen3".to_string(),
26            tags: Vec::new(),
27            capabilities: crate::domain::ModelCapabilities::empty(),
28            param_count: "7B".to_string(),
29            quantization: None,
30            architecture: None,
31            created_at: 0,
32            file_size: 0,
33            context_length: None,
34            inference_defaults: None,
35            defaults_origin: None,
36            server_defaults: None,
37        }
38    }
39}