MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_agent_memory_score_uses_config

Function test_agent_memory_score_uses_config

core/src/memory.rs:487–500  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

485
486 #[test]
487 fn test_agent_memory_score_uses_config() {
488 let config = MemoryConfig {
489 relevance: RelevanceConfig {
490 decay_days: 7.0,
491 importance_weight: 0.9,
492 recency_weight: 0.1,
493 },
494 ..Default::default()
495 };
496 let memory = AgentMemory::with_config(Arc::new(InMemoryStore::new()), config);
497 let item = MemoryItem::new("Test").with_importance(1.0);
498 let score = memory.score(&item, Utc::now());
499 assert!(score > 0.95, "Score was {score}");
500 }
501}

Callers

nothing calls this directly

Calls 2

nowFunction · 0.85
scoreMethod · 0.80

Tested by

no test coverage detected