mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 22:05:19 +00:00
revert: text split
This commit is contained in:
parent
7212b7c8aa
commit
6d350fb8bc
1 changed files with 1 additions and 1 deletions
|
|
@ -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.match(/[^.?!]+[.!?]+[\])'"`’”]*|.+/g);
|
let sentences = text.split(/(?<=[.!?])\s+/);
|
||||||
|
|
||||||
// Restore code blocks and process sentences
|
// Restore code blocks and process sentences
|
||||||
sentences = sentences.map((sentence) => {
|
sentences = sentences.map((sentence) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue