mirror of
https://github.com/open-webui/open-webui
synced 2024-11-17 05:53:11 +00:00
This commit is contained in:
parent
5d1573fd1b
commit
de3d49000e
@ -525,7 +525,7 @@ export const extractSentences = (text) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Split the modified text into sentences based on common punctuation marks, avoiding these blocks
|
// 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
|
// Restore code blocks and process sentences
|
||||||
sentences = sentences.map((sentence) => {
|
sentences = sentences.map((sentence) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user