mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 修复token计算方法
This commit is contained in:
parent
a94017e6e5
commit
f01d1d3998
3 changed files with 8 additions and 8 deletions
|
|
@ -517,7 +517,7 @@ var ChatGPTAPI = /** @class */ (function () {
|
|||
return [3 /*break*/, 27];
|
||||
}
|
||||
messages = nextMessages;
|
||||
numTokens = nextNumTokensEstimate;
|
||||
numTokens = nextNumTokensEstimate + functionToken;
|
||||
if (!isValidPrompt) {
|
||||
return [3 /*break*/, 27];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue