1.0.3 • Published 27 days ago

@jill64/cf-tiktoken v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

@jill64/cf-tiktoken

⏳ 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

1.0.3

27 days ago

1.0.2

1 month ago

1.0.1

3 months ago

1.0.0

5 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.1

6 months ago