mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Refactor getStreamingReply to use nullish coalescing for show_thoughts
This commit is contained in:
@ -2271,7 +2271,7 @@ async function sendOpenAIRequest(type, messages, signal) {
|
|||||||
*/
|
*/
|
||||||
export function getStreamingReply(data, state, { chatCompletionSource = null, overrideShowThoughts = null } = {}) {
|
export function getStreamingReply(data, state, { chatCompletionSource = null, overrideShowThoughts = null } = {}) {
|
||||||
const chat_completion_source = chatCompletionSource ?? oai_settings.chat_completion_source;
|
const chat_completion_source = chatCompletionSource ?? oai_settings.chat_completion_source;
|
||||||
const show_thoughts = overrideShowThoughts !== null ? overrideShowThoughts : oai_settings.show_thoughts;
|
const show_thoughts = overrideShowThoughts ?? oai_settings.show_thoughts;
|
||||||
|
|
||||||
if (chat_completion_source === chat_completion_sources.CLAUDE) {
|
if (chat_completion_source === chat_completion_sources.CLAUDE) {
|
||||||
if (show_thoughts) {
|
if (show_thoughts) {
|
||||||
|
Reference in New Issue
Block a user