mirror of
https://github.com/LLM-Red-Team/qwen-free-api.git
synced 2024-11-13 16:29:21 +08:00
Merge branch 'master' of https://github.com/LLM-Red-Team/qwen-free-api
This commit is contained in:
commit
ca3c1142ac
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "qwen-free-api",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"description": "Qwen Free API Server",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@ -6,5 +6,6 @@ export default {
|
||||
API_FILE_URL_INVALID: [-2003, '远程文件URL非法'],
|
||||
API_FILE_EXECEEDS_SIZE: [-2004, '远程文件超出大小'],
|
||||
API_CHAT_STREAM_PUSHING: [-2005, '已有对话流正在输出'],
|
||||
API_CONTENT_FILTERED: [-2006, '内容由于合规问题已被阻止生成']
|
||||
API_CONTENT_FILTERED: [-2006, '内容由于合规问题已被阻止生成'],
|
||||
API_IMAGE_GENERATION_FAILED: [-2007, '图像生成失败']
|
||||
}
|
@ -260,6 +260,9 @@ async function generateImages(
|
||||
// 异步移除会话,如果消息不合规,此操作可能会抛出数据库错误异常,请忽略
|
||||
removeConversation(convId, ticket).catch((err) => console.error(err));
|
||||
|
||||
if(imageUrls.length == 0)
|
||||
throw new APIException(EX.API_IMAGE_GENERATION_FAILED);
|
||||
|
||||
return imageUrls;
|
||||
})().catch((err) => {
|
||||
if (retryCount < MAX_RETRY_COUNT) {
|
||||
|
Loading…
Reference in New Issue
Block a user