Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing example code for js-tiktoken #102

Open
coding22 opened this issue May 9, 2024 · 1 comment
Open

missing example code for js-tiktoken #102

coding22 opened this issue May 9, 2024 · 1 comment

Comments

@coding22
Copy link

coding22 commented May 9, 2024

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 coding22 changed the title missing example code for tiktoken-js missing example code for js-tiktoken May 9, 2024
@baibaomen
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants