We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b9079d commit 0324fc6Copy full SHA for 0324fc6
lib/Service/OpenAiAPIService.php
@@ -487,6 +487,9 @@ public function createChatCompletion(
487
'function' => $toolCall,
488
];
489
$formattedToolCall['function']['arguments'] = json_encode($toolCall['args']);
490
+ if ($formattedToolCall === '[]') {
491
+ $formattedToolCall = '{}';
492
+ }
493
unset($formattedToolCall['function']['id']);
494
unset($formattedToolCall['function']['args']);
495
unset($formattedToolCall['function']['type']);
0 commit comments