mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 02:12:38 +00:00
perf: token count (#1509)
This commit is contained in:
@@ -16,8 +16,8 @@ async function handler(
|
||||
req: ApiRequestProps<tokenBody, tokenQuery>,
|
||||
res: ApiResponseType<any>
|
||||
): Promise<tokenResponse> {
|
||||
await authCert({ req, authRoot: true });
|
||||
const start = Date.now();
|
||||
await authCert({ req, authRoot: true });
|
||||
|
||||
const tokens = await countGptMessagesTokens(req.body.messages);
|
||||
|
||||
|
Reference in New Issue
Block a user