update package

This commit is contained in:
sijinhui
2024-04-13 11:38:38 +08:00
parent e2f78ede72
commit 3b36628bc1
2 changed files with 5 additions and 5 deletions

View File

@@ -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;
}