处理AI绘图字段变更

This commit is contained in:
Vinlic 2024-05-15 10:58:45 +08:00
parent b9d85f304f
commit a9a4f7f659

View File

@ -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