mirror of
https://github.com/open-webui/open-webui.git
synced 2026-04-28 11:38:38 -05:00
This commit is contained in:
@@ -525,7 +525,7 @@ export const extractSentences = (text) => {
|
||||
});
|
||||
|
||||
// Split the modified text into sentences based on common punctuation marks, avoiding these blocks
|
||||
let sentences = text.split(/(?<=[.!?])\s+/);
|
||||
let sentences = text.match(/[^.?!]+[.!?]+[\])'"`’”]*|.+/g);
|
||||
|
||||
// Restore code blocks and process sentences
|
||||
sentences = sentences.map((sentence) => {
|
||||
|
||||
Reference in New Issue
Block a user