mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-18 15:03:43 +08:00
update package
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import bcrypt from "bcryptjs";
|
||||
import { get_encoding } from "tiktoken";
|
||||
|
||||
const encoding = get_encoding("cl100k_base");
|
||||
|
||||
export function getTokenLength(input: string): number {
|
||||
const encoding = get_encoding("cl100k_base");
|
||||
return encoding.encode(input).length;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user