MCPcopy Create free account
hub / github.com/acking-you/static_flow / image_model_cache_limit

Function image_model_cache_limit

crates/embedding/src/image.rs:129–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128#[cfg(not(target_arch = "wasm32"))]
129fn image_model_cache_limit() -> usize {
130 *FASTEMBED_IMAGE_MODEL_CACHE_LIMIT.get_or_init(|| {
131 env::var("FASTEMBED_MAX_CACHED_IMAGE_MODELS")
132 .ok()
133 .and_then(|value| value.parse::<usize>().ok())
134 .filter(|value| *value > 0)
135 .unwrap_or(DEFAULT_MAX_CACHED_IMAGE_MODELS)
136 })
137}
138
139#[cfg(test)]
140mod tests {

Callers 1

Calls 1

okMethod · 0.80

Tested by

no test coverage detected