mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07: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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { AbstractTool } from './AbstractTool.js'
|
||||
import cfg from '../../../../lib/config/config.js'
|
||||
|
||||
export class EditCardTool extends AbstractTool {
|
||||
name = 'editCard'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue