chore: update version to 145.3.0

This commit is contained in:
Kwaroran
2025-01-02 03:02:54 +09:00
parent b80f15f885
commit 866996ba1e
5 changed files with 19 additions and 38 deletions

View File

@@ -227,16 +227,28 @@ export async function requestChatData(arg:requestDataArgument, model:ModelModeEx
}
if(da.type === 'success' && db.banCharacterset?.length > 0){
let failed = false
for(const set of db.banCharacterset){
console.log(set)
const checkRegex = new RegExp(`\\p{Script=${set}}`, 'gu')
if(checkRegex.test(da.result)){
return {
type: 'fail',
result: 'Banned character found'
trys += 1
if(trys > db.requestRetrys){
return {
type: 'fail',
result: 'Banned character found, retry limit reached'
}
}
failed = true
break
}
}
if(failed){
continue
}
}