Skip to content

Commit

Permalink
修复多轮对话下,无法重复唤起联网检索的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed Apr 12, 2024
1 parent cfec318 commit 1a3327c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/controllers/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ function messagesPrepare(messages: any[]) {
return _content + `${message.role || "user"}:${v["text"] || ""}\n`;
}, content);
}
return content += `${message.role || 'user'}:${wrapUrlsToTags(message.content)}\n`;
return content += `${message.role || 'user'}:${message.role == 'user' ? wrapUrlsToTags(message.content) : message.content}\n`;
}, '');
logger.info("\n对话合并:\n" + content);
return [
Expand Down

0 comments on commit 1a3327c

Please sign in to comment.