Improve AI error detection

This commit is contained in:
Sam Becker 2025-04-18 11:20:34 -05:00
parent 39f018f084
commit 08b3101218

View File

@ -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,