- }
- 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..a2ed2227d 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";
export function getTokenLength(input: string): number {
const encoding = get_encoding("cl100k_base");
- // console.log('tokens: ', input, encoding.countTokens())
return encoding.encode(input).length;
}