Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
6d350fb8
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "c7a9b5ccfab963803916e63df68058a3938d511b"
Commit
6d350fb8
authored
Jul 01, 2024
by
Timothy J. Baek
Browse files
revert: text split
parent
7212b7c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/lib/utils/index.ts
src/lib/utils/index.ts
+1
-1
No files found.
src/lib/utils/index.ts
View file @
6d350fb8
...
...
@@ -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
.
match
(
/
[^
.?!
]
+
[
.!?
]
+
[\]
)'"`’”
]
*|.
+/
g
);
let
sentences
=
text
.
split
(
/
(?<
=
[
.!?
])\s
+/
);
// Restore code blocks and process sentences
sentences
=
sentences
.
map
((
sentence
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment