support reasoning field
This commit is contained in:
parent
ae8b09d45f
commit
d0449c9967
@ -229,7 +229,7 @@ export const useApiRequest = (
|
|||||||
if (data.choices?.[0]) {
|
if (data.choices?.[0]) {
|
||||||
const choice = data.choices[0];
|
const choice = data.choices[0];
|
||||||
let content = choice.message?.content || '';
|
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);
|
const processed = processThinkTags(content, reasoningContent);
|
||||||
|
|
||||||
@ -333,6 +333,9 @@ export const useApiRequest = (
|
|||||||
if (delta.reasoning_content) {
|
if (delta.reasoning_content) {
|
||||||
streamMessageUpdate(delta.reasoning_content, 'reasoning');
|
streamMessageUpdate(delta.reasoning_content, 'reasoning');
|
||||||
}
|
}
|
||||||
|
if (delta.reasoning) {
|
||||||
|
streamMessageUpdate(delta.reasoning, 'reasoning');
|
||||||
|
}
|
||||||
if (delta.content) {
|
if (delta.content) {
|
||||||
streamMessageUpdate(delta.content, 'content');
|
streamMessageUpdate(delta.content, 'content');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user