@jill64/cf-tiktoken

1.0.6 • Public • Published

@jill64/cf-tiktoken

npm-version npm-license npm-download-month npm-min-size

⏳ js-tiktoken on Cloudflare Pages

Currently js-tiktoken does not work with Cloudflare Pages due to worker size limitations.
This library uses conditional export to exclude js-tiktoken implementations from Cloudflare worker bundles.

[!IMPORTANT] This is not the library that makes js-tiktoken work on Cloudflare Workers.

Installation

npm i @jill64/cf-tiktoken
// This function can be imported by both edge and browser.
// however, on edge it returns invalid output regardless of the input value.
import { encodingForModel } from '@jill64/cf-tiktoken'

export const fn = () => {
  const enc = encodingForModel('gpt-4')
  // ...
}

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.6176latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.6176
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.1.10
0.1.00
0.0.10

Package Sidebar

Install

npm i @jill64/cf-tiktoken

Weekly Downloads

176

Version

1.0.6

License

MIT

Unpacked Size

5.07 kB

Total Files

9

Last publish

Collaborators

  • jill64