perf: stream response

This commit is contained in:
archer
2023-05-19 00:00:56 +08:00
parent 7408db9cf6
commit a62a9c4067
13 changed files with 43 additions and 92 deletions

View File

@@ -37,7 +37,7 @@ export const jsonRes = <T = any>(
if (typeof error === 'string') {
msg = error;
} else if (proxyError[error?.code]) {
msg = '服务器代理出错';
msg = '接口连接异常';
} else if (error?.response?.data?.error?.message) {
msg = error?.response?.data?.error?.message;
} else if (openaiError2[error?.response?.data?.error?.type]) {