Mobile device conversation error #3372
Replies: 1 comment 2 replies
-
This error was first observed in version 0.3.5, but the underlying regular expression was added as early as version 0.1.x. open-webui/src/lib/utils/index.ts Line 462 in 9e4dd4b As mentioned in this Stack Overflow question: https://stackoverflow.com/questions/51568821/works-in-chrome-but-breaks-in-safari-invalid-regular-expression-invalid-group, regex lookbehind doesn't work on Safari before version 16.4 (iOS 16.4), which was released in Spring 2023. To resolve this issue, changing the line to the following one should fix the problem. const sentences = text.match(/[^.?!] [.!?] [\])'"`’”]*|. /g) || []; This is not only compatible with older version of Safari but also way faster in Safari than the lookbehind implementation. I have benchmarked on a long text:
|
Beta Was this translation helpful? Give feedback.
-
When I used a mobile device to use my openwebui and conduct a conversation, the following error was prompted in the reply: Invalid regular expression: invalid group specifier name (the reply from AI can usually return a few words and truncate normally)
I have confirmed that this problem will occur when using all channel source models through the mobile terminal.
I have confirmed that this problem will not occur on the PC side.
There is no error in the console, and all return 200.
Deployment device: huggingface (from the official template) and ubuntu 20
Used device: iOS iPadOS
Beta Was this translation helpful? Give feedback.
All reactions