Skip to content
Snippets Groups Projects

[3453603] ckeditor now works with the AI from the AI model.

Closed wouters_f requested to merge issue/ai-3453603:3453603-generic-ckeditor-plugin into 1.0.x
Files
40
@@ -14,6 +14,7 @@ use Drupal\ai\Service\AiProviderFormHelper;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Link;
use Drupal\provider_openai\OpenAiChatMessageIterator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
@@ -217,7 +218,7 @@ class ChatGenerationForm extends FormBase {
$image = "";
if (isset($files['files']['image_' . $index])) {
$raw_file = file_get_contents($files['files']['image_' . $index]->getPathname());
$image = new ImageFile($raw_file, $files['files']['image_' . $index]->getClientMimeType(), $files['files']['image_' . $index]->getClientOriginalName());
$image = new ImageFile($raw_file, $files['files']['image_' . $index]->getClientMimeType(), $files['files']['image_' . $index]->getClientOriginalName());
}
if ($role && $message) {
$images = [];
Loading