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

Function estimate_tokens

core/src/agent/context_perception.rs:284–286  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

282
283#[cfg(feature = "ahp")]
284fn estimate_tokens(text: &str) -> usize {
285 (text.len() / 4).max(1)
286}
287
288#[cfg(feature = "ahp")]
289fn ahp_context_result(

Callers 1

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected