mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🛠️ refactor: Improve Logging and Error Handling in ToolService and useSSE (#2922)
* refactor(ToolService): streamline logging and tool error handling, also ensure generated outputs always have `output` field * refactor(useSSE): error message for server connection issue * refactor: add back capture group of sensitive information.js * hotfix: cohere chinese character unicode issue, return aggregated reply
This commit is contained in:
parent
a6058c5669
commit
08d6bea359
4 changed files with 34 additions and 30 deletions
|
|
@ -438,9 +438,17 @@ class ChatGPTClient extends BaseClient {
|
|||
|
||||
if (message.eventType === 'text-generation' && message.text) {
|
||||
onTokenProgress(message.text);
|
||||
} else if (message.eventType === 'stream-end' && message.response) {
|
||||
reply += message.text;
|
||||
}
|
||||
/*
|
||||
Cohere API Chinese Unicode character replacement hotfix.
|
||||
Should be un-commented when the following issue is resolved:
|
||||
https://github.com/cohere-ai/cohere-typescript/issues/151
|
||||
|
||||
else if (message.eventType === 'stream-end' && message.response) {
|
||||
reply = message.response.text;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
return reply;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue