MCPcopy Create free account
hub / github.com/AI45Lab/Code / metadata_score

Function metadata_score

core/src/context/mod.rs:304–309  ·  view source on GitHub ↗
(value: Option<&serde_json::Value>)

Source from the content-addressed store, hash-verified

302}
303
304fn metadata_score(value: Option<&serde_json::Value>) -> f32 {
305 value
306 .and_then(serde_json::Value::as_f64)
307 .map(|score| (score as f32).clamp(0.0, 1.0))
308 .unwrap_or(0.0)
309}
310
311/// Result from a context provider query
312#[derive(Debug, Clone, Default, Serialize, Deserialize)]

Callers 3

priorityMethod · 0.85
trustMethod · 0.85
freshnessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected