mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-23 23:29:31 +01:00
refac
This commit is contained in:
@@ -436,7 +436,7 @@ export const removeEmojis = (str) => {
|
||||
|
||||
export const extractSentences = (text) => {
|
||||
// Split the paragraph into sentences based on common punctuation marks
|
||||
const sentences = text.split(/(?<=[.!?])/);
|
||||
const sentences = text.split(/(?<=[.!?])\s+/);
|
||||
|
||||
return sentences
|
||||
.map((sentence) => removeEmojis(sentence.trim()))
|
||||
|
||||
Reference in New Issue
Block a user