From 3b36628bc17656d3a137fd85705f3058dbaaf2d4 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Sat, 13 Apr 2024 11:38:38 +0800 Subject: [PATCH] update package --- lib/utils.ts | 2 +- package.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/utils.ts b/lib/utils.ts index a2ed2227d..4336e02d2 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -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; } diff --git a/package.json b/package.json index b7026972f..d6140e629 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@fortaine/fetch-event-source": "^3.0.6", "@hello-pangea/dnd": "^16.5.0", "@next-auth/prisma-adapter": "^1.0.7", - "@next/third-parties": "^14.1.0", + "@next/third-parties": "^14.2.1", "@prisma/client": "5.12.1", "@svgr/webpack": "^8.1.0", "@vercel/analytics": "^1.1.2", @@ -35,8 +35,8 @@ "mermaid": "^10.7.0", "microsoft-cognitiveservices-speech-sdk": "^1.36.0", "nanoid": "^5.0.3", - "next": "^14.1.0", - "next-auth": "^4.24.5", + "next": "^14.2.1", + "next-auth": "^4.24.7", "node-fetch": "^3.3.1", "nodemailer": "^6.9.13", "react": "^18.2.0", @@ -72,7 +72,7 @@ "cross-env": "^7.0.3", "date-fns": "^3.6.0", "eslint": "^8.55.0", - "eslint-config-next": "^14.1.0", + "eslint-config-next": "^14.2.1", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.7",