mirror of
https://github.com/LLM-Red-Team/kimi-free-api.git
synced 2024-11-01 22:09:20 +08:00
请求载荷大小限制提高到100mb,增加新的异常信息
This commit is contained in:
parent
fc5c13b650
commit
25606dc1ea
@ -4,5 +4,6 @@ export default {
|
||||
API_REQUEST_FAILED: [-2001, '请求失败'],
|
||||
API_TOKEN_EXPIRES: [-2002, 'Token已失效'],
|
||||
API_FILE_URL_INVALID: [-2003, '远程文件URL非法'],
|
||||
API_FILE_EXECEEDS_SIZE: [-2004, '远程文件超出大小']
|
||||
API_FILE_EXECEEDS_SIZE: [-2004, '远程文件超出大小'],
|
||||
API_CHAT_STREAM_PUSHING: [-2005, '已有对话流正在输出']
|
||||
}
|
@ -461,6 +461,8 @@ function checkResult(result: AxiosResponse, refreshToken: string) {
|
||||
return result.data;
|
||||
if (error_type == 'auth.token.invalid')
|
||||
accessTokenMap.delete(refreshToken);
|
||||
if (error_type == 'chat.user_stream_pushing')
|
||||
throw new APIException(EX.API_CHAT_STREAM_PUSHING);
|
||||
throw new APIException(EX.API_REQUEST_FAILED, `[请求kimi失败]: ${message}`);
|
||||
}
|
||||
|
||||
|
@ -44,12 +44,12 @@ export class SystemConfig {
|
||||
this.requestBody = Object.assign(requestBody || {}, {
|
||||
enableTypes: ['json', 'form', 'text', 'xml'],
|
||||
encoding: 'utf-8',
|
||||
formLimit: '10mb',
|
||||
jsonLimit: '10mb',
|
||||
textLimit: '10mb',
|
||||
xmlLimit: '10mb',
|
||||
formLimit: '100mb',
|
||||
jsonLimit: '100mb',
|
||||
textLimit: '100mb',
|
||||
xmlLimit: '100mb',
|
||||
formidable: {
|
||||
maxFileSize: '30mb'
|
||||
maxFileSize: '100mb'
|
||||
},
|
||||
multipart: true,
|
||||
parsedMethods: ['POST', 'PUT', 'PATCH']
|
||||
|
Loading…
Reference in New Issue
Block a user