- Issue created by @shaundychko
- Status changed to RTBC
about 2 months ago 10:46am 15 April 2025 - 🇧🇪Belgium svendecabooter Gent
+1 - this fix is needed for ✨ Abstract token usage support Active to work.
\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
+1 - this fix is needed for ✨ Abstract token usage support Active to work.