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

Method with_trust

core/src/context/mod.rs:250–256  ·  view source on GitHub ↗

Set trust score (0.0 to 1.0) for harness-controlled ranking.

(mut self, trust: f32)

Source from the content-addressed store, hash-verified

248
249 /// Set trust score (0.0 to 1.0) for harness-controlled ranking.
250 pub fn with_trust(mut self, trust: f32) -> Self {
251 self.metadata.insert(
252 CONTEXT_TRUST_METADATA.to_string(),
253 serde_json::json!(trust.clamp(0.0, 1.0)),
254 );
255 self
256 }
257
258 /// Set freshness score (0.0 to 1.0) for harness-controlled ranking.
259 pub fn with_freshness(mut self, freshness: f32) -> Self {

Callers 8

push_agents_md_contextFunction · 0.80
queryMethod · 0.80
queryMethod · 0.80

Calls 1

insertMethod · 0.45

Tested by 1