mirror of
https://github.com/LLM-Red-Team/glm-free-api.git
synced 2024-12-22 17:09:22 +08:00
修复DALL-E兼容图像接口
This commit is contained in:
parent
34282ad837
commit
72b3698757
@ -1064,10 +1064,10 @@ async function receiveImages(
|
|||||||
throw new APIException(EX.API_CONTENT_FILTERED);
|
throw new APIException(EX.API_CONTENT_FILTERED);
|
||||||
if (result.status != "finish") {
|
if (result.status != "finish") {
|
||||||
result.parts.forEach((part) => {
|
result.parts.forEach((part) => {
|
||||||
const { content } = part;
|
const { status: partStatus, content } = part;
|
||||||
if (!_.isArray(content)) return;
|
if (!_.isArray(content)) return;
|
||||||
content.forEach((value) => {
|
content.forEach((value) => {
|
||||||
const { status: partStatus, type, image, text } = value;
|
const { type, image, text } = value;
|
||||||
if (
|
if (
|
||||||
type == "image" &&
|
type == "image" &&
|
||||||
_.isArray(image) &&
|
_.isArray(image) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user