[chore] Reformat new code

5c79c8e1628f898fe953b6df49602e02882c5f44

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +8 -8Ignore whitespace
public/scripts/openai.js+5 -5
@@ -2167,15 +2167,15 @@ function getStreamingReply(data, state) {
21672167 state.reasoning += (data.choices?.filter(x => x?.delta?.reasoning)?.[0]?.delta?.reasoning || '');
21682168 }
21692169 return data.choices?.[0]?.delta?.content ?? data.choices?.[0]?.message?.content ?? data.choices?.[0]?.text ?? '';
21702170 } else if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM) {
21712171 if (oai_settings.show_thoughts) {
21722172 state.reasoning +=
21732173 data.choices?.filter(x => x?.delta?.reasoning_content)?.[0]?.delta?.reasoning_content ??
21742174 data.choices?.filter(x => x?.delta?.reasoning)?.[0]?.delta?.reasoning ??
21752175 '';
21762176 }
21772177 return data.choices?.[0]?.delta?.content ?? data.choices?.[0]?.message?.content ?? data.choices?.[0]?.text ?? '';
21782178 } else {
21792179 return data.choices?.[0]?.delta?.content ?? data.choices?.[0]?.message?.content ?? data.choices?.[0]?.text ?? '';
21802180 }
21812181}
public/scripts/reasoning.js+3 -3
@@ -76,10 +76,10 @@ export function extractReasoningFromData(data) {
7676 return data?.choices?.[0]?.message?.reasoning ?? '';
7777 case chat_completion_sources.MAKERSUITE:
7878 return data?.responseContent?.parts?.filter(part => part.thought)?.map(part => part.text)?.join('\n\n') ?? '';
7979 case chat_completion_sources.CUSTOM: {
8080 return data?.choices?.[0]?.message?.reasoning_content
8181 ?? data?.choices?.[0]?.message?.reasoning
8282 ?? '';
8383 }
8484 }
8585 break;