mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
feat: 初步支持function call(WIP)
This commit is contained in:
parent
4a4dceec18
commit
97b3acbf3b
24 changed files with 13607 additions and 841 deletions
|
|
@ -786,3 +786,19 @@ export function processList (whitelist, blacklist) {
|
|||
blacklist = Array.from(new Set(blacklist)).filter(value => /^\^?[1-9]\d{5,9}$/.test(value))
|
||||
return [whitelist, blacklist]
|
||||
}
|
||||
|
||||
export function getMaxModelTokens (model = 'gpt-3.5-turbo') {
|
||||
if (model.startsWith('gpt-3.5-turbo')) {
|
||||
if (model.includes('16k')) {
|
||||
return 16000
|
||||
} else {
|
||||
return 4000
|
||||
}
|
||||
} else {
|
||||
if (model.includes('32k')) {
|
||||
return 32000
|
||||
} else {
|
||||
return 16000
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue