MCPcopy Index your code
hub / github.com/continuedev/continue / encode

Function encode

core/llm/tiktokenWorkerPool.mjs:6–8  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

4const tiktokenEncoding = _encodingForModel("gpt-4");
5
6function encode(text) {
7 return tiktokenEncoding.encode(text, "all", []);
8}
9
10function decode(tokens) {
11 return tiktokenEncoding.decode(tokens);

Callers 8

shouldAutoCompactFunction · 0.50
countContentTokensFunction · 0.50
countToolOutputTokensFunction · 0.50
countSingleToolTokensFunction · 0.50
countTotalInputTokensFunction · 0.50

Calls 1

encodeMethod · 0.65

Tested by

no test coverage detected