Merge pull request #2207 from QAbot-zh/reasoning

support reasoning field for playground
This commit is contained in:
Seefs
2025-11-15 13:26:57 +08:00
committed by GitHub

View File

@@ -229,7 +229,7 @@ export const useApiRequest = (
if (data.choices?.[0]) {
const choice = data.choices[0];
let content = choice.message?.content || '';
let reasoningContent = choice.message?.reasoning_content || '';
let reasoningContent = choice.message?.reasoning_content || choice.message?.reasoning || '';
const processed = processThinkTags(content, reasoningContent);
@@ -333,6 +333,9 @@ export const useApiRequest = (
if (delta.reasoning_content) {
streamMessageUpdate(delta.reasoning_content, 'reasoning');
}
if (delta.reasoning) {
streamMessageUpdate(delta.reasoning, 'reasoning');
}
if (delta.content) {
streamMessageUpdate(delta.content, 'content');
}