- }
- text={shouldNarrow ? undefined : Locale.Mask.Name}
- className={styles["sidebar-bar-button"]}
- onClick={() => {
- if (config.dontShowMaskSplashScreen !== true) {
- navigate(Path.NewChat, { state: { fromHome: true } });
- } else {
- navigate(Path.Masks, { state: { fromHome: true } });
- }
- }}
- shadow
- />
+ {/*}*/}
+ {/* text={shouldNarrow ? undefined : Locale.Mask.Name}*/}
+ {/* className={styles["sidebar-bar-button"]}*/}
+ {/* onClick={() => {*/}
+ {/* if (config.dontShowMaskSplashScreen !== true) {*/}
+ {/* navigate(Path.NewChat, { state: { fromHome: true } });*/}
+ {/* } else {*/}
+ {/* navigate(Path.Masks, { state: { fromHome: true } });*/}
+ {/* }*/}
+ {/* }}*/}
+ {/* shadow*/}
+ {/*/>*/}
}
text={shouldNarrow ? undefined : "赏杯咖啡️"}
diff --git a/lib/utils.ts b/lib/utils.ts
index 7b5de63fe..4336e02d2 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -1,10 +1,9 @@
import bcrypt from "bcryptjs";
-import {get_encoding} from "tiktoken";
+import { get_encoding } from "tiktoken";
+const encoding = get_encoding("cl100k_base");
export function getTokenLength(input: string): number {
- const encoding = get_encoding("cl100k_base");
- // console.log('tokens: ', input, encoding.countTokens())
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",