fix log bug
This commit is contained in:
@@ -398,8 +398,11 @@ const refineMessage = async (messageId: string) => {
|
||||
|
||||
if (!settings.enableStreaming) {
|
||||
const fullResponseJson = JSON.parse(response);
|
||||
settings.addLog('response', fullResponseJson);
|
||||
const refinedText = fullResponseJson.choices?.[0]?.message?.content || response;
|
||||
settings.updateChatMessage(activeSession.value.id, messageId, { translated: refinedText });
|
||||
} else {
|
||||
settings.addLog('response', '(Streaming output captured)');
|
||||
}
|
||||
} catch (err: any) {
|
||||
settings.addLog('error', String(err));
|
||||
|
||||
Reference in New Issue
Block a user