- Issue created by @g.rocchini
Using DeepSeek as Provider for the AI Assistant I get back error in request in the chat.
Install and enable the module
Create a SearchApi Server with OpenAI as Embeddings Engine (not possible to choose DeepSeek)
Go to the AI Assistant chat, edit and set AI Provider as DeepSeek, and Model as DeepSeek Chat
Start the search from the block in the site
The request terminate with error, and in the log I have
Error: Call to a member function getNormalized() on array in Drupal\ai_chatbot\Form\ChatForm->submitForm() (line 140 of /var/www/html/web/modules/contrib/ai/modules/ai_chatbot/src/Form/ChatForm.php).
#0 [internal function]: Drupal\ai_chatbot\Form\ChatForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#1 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array(Array, Array)
#2 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#3 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#4 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm('ai_foundation_c...', Array, Object(Drupal\Core\Form\FormState))
#5 /var/www/html/web/modules/contrib/ai/modules/ai_chatbot/src/Plugin/Block/ChatFormBlock.php(252): Drupal\Core\Form\FormBuilder->buildForm('Drupal\\ai_chatb...', Object(Drupal\Core\Form\FormState))
#6 /var/www/html/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\ai_chatbot\Plugin\Block\ChatFormBlock->build()
#7 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
#8 /var/www/html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array('Drupal\\block\\Bl...', Array)
#9 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(870): Drupal\Core\Render\Renderer->doTrustedCallback('Drupal\\block\\Bl...', Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#10 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(432): Drupal\Core\Render\Renderer->doCallback('#pre_render', 'Drupal\\block\\Bl...', Array)
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender(Array)
#12 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#13 /var/www/html/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render(Array)
#14 /var/www/html/vendor/twig/twig/src/Environment.php(407) : eval()'d code(74): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#15 /var/www/html/vendor/twig/twig/src/Template.php(387): __TwigTemplate_4ed21c2ee6b585442eb7b78d3e67430a->doDisplay(Array, Array)
#16 /var/www/html/vendor/twig/twig/src/Template.php(343): Twig\Template->yield(Array, Array)
#17 /var/www/html/vendor/twig/twig/src/Template.php(358): Twig\Template->display(Array)
#18 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render(Array)
#19 /var/www/html/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
#20 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/custom/t...', Array)
#21 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render('page', Array)
#22 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#23 /var/www/html/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render(Array)
#24 /var/www/html/vendor/twig/twig/src/Environment.php(407) : eval()'d code(91): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#25 /var/www/html/vendor/twig/twig/src/Template.php(387): __TwigTemplate_9e6f7eb9e58d8ffd4766d6eeb66df6bf->doDisplay(Array, Array)
#26 /var/www/html/vendor/twig/twig/src/Template.php(343): Twig\Template->yield(Array, Array)
#27 /var/www/html/vendor/twig/twig/src/Template.php(358): Twig\Template->display(Array)
#28 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render(Array)
#29 /var/www/html/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
#30 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/custom/t...', Array)
#31 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render('html', Array)
#32 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#33 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render(Array)
#34 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#35 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#36 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#37 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#38 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#39 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#40 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#41 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#43 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#46 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#51 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#52 {main}
Active
1.0
Code