From 7df6a78f3383fdf538dd02ebcc966b3140e54e69 Mon Sep 17 00:00:00 2001 From: bmen25124 Date: Fri, 21 Mar 2025 22:19:13 +0300 Subject: [PATCH] Better overrideShowThoughts value --- public/scripts/openai.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 3764563f5..ae15d6409 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -2269,9 +2269,9 @@ async function sendOpenAIRequest(type, messages, signal) { * @param {boolean?} [options.overrideShowThoughts] Override show thoughts * @returns {string} The reply extracted from the response data */ -export function getStreamingReply(data, state, { chatCompletionSource = null, overrideShowThoughts } = {}) { +export function getStreamingReply(data, state, { chatCompletionSource = null, overrideShowThoughts = null } = {}) { const chat_completion_source = chatCompletionSource ?? oai_settings.chat_completion_source; - const show_thoughts = overrideShowThoughts !== undefined ? overrideShowThoughts : oai_settings.show_thoughts; + const show_thoughts = overrideShowThoughts !== null ? overrideShowThoughts : oai_settings.show_thoughts; if (chat_completion_source === chat_completion_sources.CLAUDE) { if (show_thoughts) {