mirror of
https://github.com/foxhui/WebAI2API.git
synced 2026-06-16 21:03:59 +08:00
feat: 增加 zAI 的错误捕获
This commit is contained in:
@@ -277,7 +277,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
urlMatch: 'chat/completions',
|
||||
method: 'POST',
|
||||
timeout: 120000,
|
||||
errorText: ['Model is unable to process your request'],
|
||||
errorText: ['Model is unable to process your request', 'Rate limit reached'],
|
||||
meta
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -313,7 +313,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
urlMatch: 'chat/completed',
|
||||
method: 'POST',
|
||||
timeout: 120000,
|
||||
errorText: ['Model is unable to process your request'],
|
||||
errorText: ['Model is unable to process your request', 'Rate limit reached'],
|
||||
meta
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@@ -257,6 +257,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
urlMatch: 'chat/completions',
|
||||
method: 'POST',
|
||||
timeout: 120000,
|
||||
errorText: ['Model is unable to process your request', 'Rate limit reached'],
|
||||
meta
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -292,6 +293,7 @@ async function generate(context, prompt, imgPaths, modelId, meta = {}) {
|
||||
urlMatch: 'chat/completed',
|
||||
method: 'POST',
|
||||
timeout: 120000,
|
||||
errorText: ['Model is unable to process your request', 'Rate limit reached'],
|
||||
meta
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user