mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: try to add required token
This commit is contained in:
parent
53ad413f52
commit
dd249615e4
2 changed files with 7 additions and 2 deletions
|
|
@ -446,6 +446,12 @@ export class ChatGPTAPI {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (func.parameters.required) {
|
||||
for (let string of func.parameters.required) {
|
||||
functionToken += 2
|
||||
functionToken += await this._getTokenCount(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
do {
|
||||
const prompt = nextMessages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue