| 2269 | * @param {boolean?} [options.overrideShowThoughts] Override show thoughts | 2269 | * @param {boolean?} [options.overrideShowThoughts] Override show thoughts |
| 2270 | * @returns {string} The reply extracted from the response data | 2270 | * @returns {string} The reply extracted from the response data |
| 2271 | */ | 2271 | */ |
| 2272 | export function getStreamingReply(data, state, { chatCompletionSource = null, overrideShowThoughts } = {}) { | 2272 | export function getStreamingReply(data, state, { chatCompletionSource = null, overrideShowThoughts = null } = {}) { |
| 2273 | const chat_completion_source = chatCompletionSource ?? oai_settings.chat_completion_source; | 2273 | const chat_completion_source = chatCompletionSource ?? oai_settings.chat_completion_source; |
| 2274 | const show_thoughts = overrideShowThoughts !== undefined ? overrideShowThoughts : oai_settings.show_thoughts; | 2274 | const show_thoughts = overrideShowThoughts !== null ? overrideShowThoughts : oai_settings.show_thoughts; |
| 2275 | | 2275 | |
| 2276 | if (chat_completion_source === chat_completion_sources.CLAUDE) { | 2276 | if (chat_completion_source === chat_completion_sources.CLAUDE) { |
| 2277 | if (show_thoughts) { | 2277 | if (show_thoughts) { |