Skip to content

Commit

Permalink
去除更多引用标签
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed May 14, 2024
1 parent 0a5dbd1 commit baf616e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "step-free-api",
"version": "0.0.15",
"version": "0.0.16",
"description": "Stepchat Free API Server",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/api/controllers/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ async function receiveStream(model: string, convId: string, stream: any) {
} else if (result.textEvent && result.textEvent.text)
data.choices[0].message.content += result.textEvent.text;
else if (result.doneEvent) {
data.choices[0].message.content = data.choices[0].message.content.replace(/<web_[0-9a-zA-Z]+>/g, '');
data.choices[0].message.content = data.choices[0].message.content.replace(/<(web|url|unknown)_[0-9a-zA-Z]+>/g, '');
data.choices[0].message.content += refContent
? `\n\n搜索结果来自:\n${refContent.replace(/\n$/, "")}`
: "";
Expand Down

0 comments on commit baf616e

Please sign in to comment.