MCPcopy
hub / github.com/OpenPipe/OpenPipe / countLlamaOutputTokens

Function countLlamaOutputTokens

app/src/utils/countTokens.ts:50–51  ·  view source on GitHub ↗
(output: ChatCompletionMessage)

Source from the content-addressed store, hash-verified

48 countLlamaTokens(serializeChatInput(input, { pipelineVersion: CURRENT_PIPELINE_VERSION }));
49
50export const countLlamaOutputTokens = (output: ChatCompletionMessage) =>
51 countLlamaTokens(serializeChatOutput(output));

Callers 2

calculateUsageFunction · 0.90

Calls 2

serializeChatOutputFunction · 0.90
countLlamaTokensFunction · 0.85

Tested by

no test coverage detected