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

Function text_model_cache_limit

crates/embedding/src/text.rs:182–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180
181#[cfg(not(target_arch = "wasm32"))]
182fn text_model_cache_limit() -> usize {
183 *FASTEMBED_TEXT_MODEL_CACHE_LIMIT.get_or_init(|| {
184 env::var("FASTEMBED_MAX_CACHED_TEXT_MODELS")
185 .ok()
186 .and_then(|value| value.parse::<usize>().ok())
187 .filter(|value| *value > 0)
188 .unwrap_or(DEFAULT_MAX_CACHED_TEXT_MODELS)
189 })
190}
191
192#[cfg(test)]
193mod tests {

Callers 1

fastembed_embeddingFunction · 0.85

Calls 1

okMethod · 0.80

Tested by

no test coverage detected