feat: bym.js support multiple models

This commit is contained in:
ikechan8370 2025-02-03 00:07:26 +08:00
parent f7030e8427
commit 69ab6dcd28
12 changed files with 471 additions and 668 deletions

View file

@ -1,3 +1,4 @@
// @ts-ignore
import { getEncoding } from 'js-tiktoken'
// TODO: make this configurable
@ -5,4 +6,4 @@ const tokenizer = getEncoding('cl100k_base')
export function encode(input: string): Uint32Array {
return new Uint32Array(tokenizer.encode(input))
}
}