chore: update version to 145.3.0
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user