Improve AI error detection
This commit is contained in:
parent
39f018f084
commit
08b3101218
@ -38,7 +38,7 @@ export default function useAiImageQuery(
|
||||
}, []);
|
||||
|
||||
// Withhold streaming text if it's a null response
|
||||
const isTextError = text.toLocaleLowerCase().startsWith('sorry');
|
||||
const isTextError = /^(I'*m )*sorry/i.test(text);
|
||||
|
||||
return [
|
||||
request,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user