Unable to use openai module

Created on 25 May 2024, about 1 month ago
Updated 30 May 2024, 27 days ago

Unable to use OpenAI module.
On the OpenAI Prompt Explorer, there is no response.

Server Specs
Drupal Version 10.1.8
Web Server Apache/2.4.52 (Ubuntu)
PHP Version 8.2.19 Memory limit 128M
Database Version 8.0.30 System MySQL - Managed Database at Digital Ocean
Enabled: $config['system. logging']['error_level'] = 'verbose';

ChatGPT free accounts have old and latest project-based API keys. The second new key is in use.
Everything working via the chatgpt.com website.

Error message on the settings under OpenAI Settings

Warning: Undefined array key "function" in Drupal\Core\Utility\Error::getLastCaller() (line 150 of core/lib/Drupal/Core/Utility/Error.php).

Drupal\Core\Utility\Error::getLastCaller(Array) (Line: 63)
Drupal\Core\Utility\Error::decodeException(Object) (Line: 69)
Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber->onError(Object) (Line: 117)
Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber->onException(Object, 'kernel.exception', Object)
call_user_func(Array, Object, 'kernel.exception', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.exception') (Line: 239)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object, Object, 1) (Line: 91)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Warning: Undefined array key "function" in Drupal\Core\Utility\Error::getLastCaller() (line 150 of core/lib/Drupal/Core/Utility/Error.php).

Drupal\Core\Utility\Error::getLastCaller(Array) (Line: 63)
Drupal\Core\Utility\Error::decodeException(Object) (Line: 84)
Drupal\Core\EventSubscriber\FinalExceptionSubscriber->onException(Object, 'kernel.exception', Object)
call_user_func(Array, Object, 'kernel.exception', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.exception') (Line: 239)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object, Object, 1) (Line: 91)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

The error message given below is seen in Body of create Article content after using OpenAI button in Basic HTML mode.

The website encountered an unexpected error. Please try again later.

Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException: The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned a string (""). in () (line 98 of core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php).

Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Please advice, thank you.

💬 Support request
Status

Active

Version

1.0

Component

OpenAI CKEditor

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @JoAMoS
  • 🇮🇳India siddharthjain_7998

    I am also facing the same issue. While generating the text using Text Complete feature using OpenAI CKEditor integration submodule, it gives "The website encountered an unexpected error. Please try again later." error in CKEditor.

Production build 0.69.0 2024