mirror of
https://github.com/LLM-Red-Team/kimi-free-api.git
synced 2025-10-14 14:20:36 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b3b6daf1ef | ||
![]() |
25606dc1ea |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kimi-free-api",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"description": "Kimi Free API Server",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@@ -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']
|
||||
|
Reference in New Issue
Block a user