Skip to content

Commit

Permalink
fix(toolbox): 语素分析字符串逃逸
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Jun 22, 2024
1 parent acd7889 commit d788b18
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ const instance = axios.create({
function distillText(text: string) {
// replace all square brackets and contents inside, "\\"" with ""
const regexp = /\[.*?\]|\\"|\s/g;
return text.replaceAll(regexp, "").replaceAll("#n", "\n");
return text
.replaceAll(regexp, "")
.replaceAll("#n", "\n")
.replaceAll(""", "");
}

const rag_request = {
Expand Down

0 comments on commit d788b18

Please sign in to comment.