Claude 3.7 think mode

This commit is contained in:
Cohee
2025-02-24 23:43:13 +02:00
parent db148d5142
commit b8ebed0f4c
6 changed files with 75 additions and 8 deletions

View File

@ -5725,7 +5725,7 @@ function extractMessageFromData(data) {
case 'novel':
return data.output;
case 'openai':
return data?.choices?.[0]?.message?.content ?? data?.choices?.[0]?.text ?? data?.text ?? data?.message?.content?.[0]?.text ?? data?.message?.tool_plan ?? '';
return data?.content?.find(p => p.type === 'text')?.text ?? data?.choices?.[0]?.message?.content ?? data?.choices?.[0]?.text ?? data?.text ?? data?.message?.content?.[0]?.text ?? data?.message?.tool_plan ?? '';
default:
return '';
}