mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
feat: bym.js support multiple models
This commit is contained in:
parent
f7030e8427
commit
69ab6dcd28
12 changed files with 471 additions and 668 deletions
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue