Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/ceifa/tiktoken-node
/ index.js
File
index.js
test/index.js:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
const
tiktoken = require(
'../index.cjs'
)
2
3
let
enc = tiktoken.getEncoding(
"gpt2"
)
4
console.assert(enc.decode(enc.encode(
"hello world"
)) ==
"hello world"
)
Callers
nothing calls this directly
Calls
2
decode
Method · 0.80
encode
Method · 0.80
Tested by
no test coverage detected