tiktoken icon indicating copy to clipboard operation
tiktoken copied to clipboard

missing example code for js-tiktoken

Open coding22 opened this issue 1 year ago • 1 comments

Hi,

I'm trying to run tiktoken-js without using npm, just pure JS.

However, I can't find a working example - the readme contains node instructions. Could anyone provide code that turns "Hello world" into tokens, for example using jsfiddle? Thanks!

coding22 avatar May 09 '24 13:05 coding22

Hi,

I’ve created a project that runs tiktoken-js in pure JS without npm, using Browserify. You can find it here: purejs-ticktoken. It includes an example for tokenizing "Hello world" directly in the browser.

Hope this helps!

baibaomen avatar Sep 20 '24 20:09 baibaomen