mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-06-07 22:09:57 +00:00
fix: kling risk fail return openAIVideo error
This commit is contained in:
@@ -405,5 +405,12 @@ func (a *TaskAdaptor) ConvertToOpenAIVideo(originTask *model.Task) ([]byte, erro
|
|||||||
Code: fmt.Sprintf("%d", klingResp.Code),
|
Code: fmt.Sprintf("%d", klingResp.Code),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo
|
||||||
|
if data := klingResp.Data; data.TaskStatus == "failed" {
|
||||||
|
openAIVideo.Error = &dto.OpenAIVideoError{
|
||||||
|
Message: data.TaskStatusMsg,
|
||||||
|
}
|
||||||
|
}
|
||||||
return common.Marshal(openAIVideo)
|
return common.Marshal(openAIVideo)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user