Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

Fix

Marc Klingen57dddd918618
diff --git a/src/features/ingest/lib/usage.ts b/src/features/ingest/lib/usage.ts
index a0e7f720d1..b81fc43455 100644
--- a/src/features/ingest/lib/usage.ts
+++ b/src/features/ingest/lib/usage.ts
@@ -14,7 +14,7 @@ export function tokenCount(p: {
}
if (p.model.toLowerCase().startsWith("claude")) {
// count characters
- return p.text.split(" ").length;
+ return p.text.length;
}
console.log("Unknown model", p.model);
return undefined;