Cohere: Swap message and tool plan in extractMessageFromData

This commit is contained in:
Cohee
2024-10-09 10:27:54 +03:00
parent face9462aa
commit 7162f9d562
2 changed files with 4 additions and 4 deletions

View File

@ -5436,7 +5436,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?.tool_plan ?? data?.message?.content?.[0]?.text ?? '';
return data?.choices?.[0]?.message?.content ?? data?.choices?.[0]?.text ?? data?.text ?? data?.message?.content?.[0]?.text ?? data?.message?.tool_plan ?? '';
default:
return '';
}