- Issue created by @shaundychko
\Drupal\ai\OperationType\Chat\StreamedChatMessage::__construct
expects the third parameter to be an array. However, when a streaming chat is created with usage included, such as with the following example configuration:
/** @var \Drupal\ai_provider_openai\Plugin\AiProvider\OpenAiProvider $provider */
$provider->setConfiguration([
'stream_options' => [
'include_usage' => TRUE,
],
]);
the third parameter will be an object of type OpenAI\Responses\Chat\CreateResponseUsage
resulting in an Exception.
Active
1.0
Code