添加主题

This commit is contained in:
sijinhui
2024-01-29 22:13:57 +08:00
parent 0aa5c33dae
commit 75da1568a2
4 changed files with 796 additions and 7 deletions

View File

@@ -30,12 +30,13 @@ async function handle(
// const matchResponse = request_data.logEntry.match(regex);
const regex_message = /(?<="content":")(.*?)(?="}[,\]])/g;
const matchAllMessage = request_data.logEntry.match(regex_message);
console.log(matchAllMessage, "=====");
// console.log(matchAllMessage, "=====");
if (matchAllMessage.length > 0) {
request_data.logToken =
getTokenLength(matchAllMessage.join(" ")) +
matchAllMessage.length * 3;
}
delete request_data["logEntry"];
}
} catch (e) {
console.log("[LOG]", "logToken", e);