Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -585,6 +585,9 @@ async function handleResponse(response, model, res, isStream) {
|
|
| 585 |
res.setHeader('Cache-Control', 'no-cache');
|
| 586 |
res.setHeader('Connection', 'keep-alive');
|
| 587 |
}
|
|
|
|
|
|
|
|
|
|
| 588 |
Logger.info("开始处理流式响应", 'Server');
|
| 589 |
|
| 590 |
return new Promise((resolve, reject) => {
|
|
@@ -654,8 +657,6 @@ async function handleResponse(response, model, res, isStream) {
|
|
| 654 |
res.json(MessageProcessor.createChatResponse(fullResponse, model));
|
| 655 |
}
|
| 656 |
}
|
| 657 |
-
CONFIG.IS_IMG_GEN = false;
|
| 658 |
-
CONFIG.IS_IMG_GEN2 = false;
|
| 659 |
resolve();
|
| 660 |
} catch (error) {
|
| 661 |
Logger.error(error, 'Server');
|
|
@@ -670,8 +671,6 @@ async function handleResponse(response, model, res, isStream) {
|
|
| 670 |
});
|
| 671 |
} catch (error) {
|
| 672 |
Logger.error(error, 'Server');
|
| 673 |
-
CONFIG.IS_IMG_GEN = false;
|
| 674 |
-
CONFIG.IS_IMG_GEN2 = false;
|
| 675 |
throw new Error(error);
|
| 676 |
}
|
| 677 |
}
|
|
|
|
| 585 |
res.setHeader('Cache-Control', 'no-cache');
|
| 586 |
res.setHeader('Connection', 'keep-alive');
|
| 587 |
}
|
| 588 |
+
CONFIG.IS_IMG_GEN = false;
|
| 589 |
+
CONFIG.IS_IMG_GEN2 = false;
|
| 590 |
+
CONFIG.IS_THINKING =false;
|
| 591 |
Logger.info("开始处理流式响应", 'Server');
|
| 592 |
|
| 593 |
return new Promise((resolve, reject) => {
|
|
|
|
| 657 |
res.json(MessageProcessor.createChatResponse(fullResponse, model));
|
| 658 |
}
|
| 659 |
}
|
|
|
|
|
|
|
| 660 |
resolve();
|
| 661 |
} catch (error) {
|
| 662 |
Logger.error(error, 'Server');
|
|
|
|
| 671 |
});
|
| 672 |
} catch (error) {
|
| 673 |
Logger.error(error, 'Server');
|
|
|
|
|
|
|
| 674 |
throw new Error(error);
|
| 675 |
}
|
| 676 |
}
|