Skip to content

Commit

Permalink
处理AI绘图字段变更
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed May 15, 2024
1 parent b9d85f3 commit a9a4f7f
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 @@ -651,7 +651,7 @@ async function receiveImages(
if (role != "assistant" && !_.isString(content)) return str;
return str + content;
}, "");
if (result.contentType == "text2image") {
if (result.contentFrom == "text2image") {
const urls =
text.match(
/https?:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=\,]*)/gi
Expand Down

0 comments on commit a9a4f7f

Please sign in to comment.