- Issue created by @SirClickALot
- Assigned to mandclu
- Issue was unassigned.
- 🇯🇵Japan eleonel Itoshima 🇯🇵
I'm not able to replicate the issue using the 1.1.0 release, could you please update and try again?
- 🇬🇧United Kingdom SirClickALot Somerset
Thanks for coming back to me on this.
System: Apache/2.4.33 (Win64) OpenSSL/1.0.2u mod_fcgid/2.3.9 PHP/8.1.0
1 )I have just set up a new, clean Drupal 10.1.6 and added:
https://www.drupal.org/project/augmentor
andhttps://www.drupal.org/project/augmentor_chatgpt
.2) I have set up a brand new key at OpenAI and configured everything as above - i.e. Key, ChatGPT Augmentor, Text formats and so.
I am no longer seeing the error when I try to EDIT my existing key but, as before, when I try to do some augmenting - not I'm altogether certain as to what to expect!, I get a short twirling throbber (3)...
And nothing else after that?
Except for the following two Watchdog log entries...
Warning: foreach() argument must be of type array|object, null given in Drupal\augmentor_chatgpt\Plugin\Augmentor\ChatGpt->execute() (line 327 of C:\Users\nick\Sites\drupal10\modules\contrib\augmentor_chatgpt\src\Plugin\Augmentor\ChatGpt.php) #0 C:\Users\nick\Sites\drupal10\core\includes\bootstrap.inc(164): _drupal_error_handler_real(2, 'foreach() argum...', 'C:\\Users\\nick\\S...', 327) #1 C:\Users\nick\Sites\drupal10\modules\contrib\augmentor_chatgpt\src\Plugin\Augmentor\ChatGpt.php(327): _drupal_error_handler(2, 'foreach() argum...', 'C:\\Users\\nick\\S...', 327) #2 C:\Users\nick\Sites\drupal10\modules\contrib\augmentor\src\Controller\AugmentorController.php(82): Drupal\augmentor_chatgpt\Plugin\Augmentor\ChatGpt->execute('one, two, three...') #3 [internal function]: Drupal\augmentor\Controller\AugmentorController->execute() #4 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #5 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\Render\Renderer.php(592): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #6 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #7 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #8 C:\Users\nick\Sites\drupal10\vendor\symfony\http-kernel\HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #9 C:\Users\nick\Sites\drupal10\vendor\symfony\http-kernel\HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #10 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 C:\Users\nick\Sites\drupal10\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 C:\Users\nick\Sites\drupal10\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 C:\Users\nick\Sites\drupal10\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #19 {main}
and...
Warning: Undefined array key "choices" in Drupal\augmentor_chatgpt\Plugin\Augmentor\ChatGpt->execute() (line 327 of C:\Users\nick\Sites\drupal10\modules\contrib\augmentor_chatgpt\src\Plugin\Augmentor\ChatGpt.php) #0 C:\Users\nick\Sites\drupal10\core\includes\bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined array...', 'C:\\Users\\nick\\S...', 327) #1 C:\Users\nick\Sites\drupal10\modules\contrib\augmentor_chatgpt\src\Plugin\Augmentor\ChatGpt.php(327): _drupal_error_handler(2, 'Undefined array...', 'C:\\Users\\nick\\S...', 327) #2 C:\Users\nick\Sites\drupal10\modules\contrib\augmentor\src\Controller\AugmentorController.php(82): Drupal\augmentor_chatgpt\Plugin\Augmentor\ChatGpt->execute('one, two, three...') #3 [internal function]: Drupal\augmentor\Controller\AugmentorController->execute() #4 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #5 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\Render\Renderer.php(592): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #6 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #7 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #8 C:\Users\nick\Sites\drupal10\vendor\symfony\http-kernel\HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #9 C:\Users\nick\Sites\drupal10\vendor\symfony\http-kernel\HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #10 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 C:\Users\nick\Sites\drupal10\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 C:\Users\nick\Sites\drupal10\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\StackMiddleware\StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 C:\Users\nick\Sites\drupal10\core\lib\Drupal\Core\DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 C:\Users\nick\Sites\drupal10\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #19 {main}
As per the original issue, I'm not really very sure exactly what 'type' of Key to set up so I have gone with 'configuration' as in the original screenshot, is that right, could that be the problem, I could not see any guidance on this on the module page.
It might be really helpful to other newbies on this to set up a short but complete step-by-step page including an example of SECRET generation on (say) the OpenAI site as I suspect that it is the one that most dabblers like me would try first.
Thanks again.
- 🇬🇧United Kingdom SirClickALot Somerset
Any more thoughts core Augmentor Team?
I'd love to be able to get started with this module!
- 🇯🇵Japan eleonel Itoshima 🇯🇵
Hey there, we're still evaluating the situation. We'll review it again shortly and return with some guidance soon.
- 🇬🇧United Kingdom SirClickALot Somerset
Might this be it?
ChatGPT will not allow your system to make API request if the site is not SSL enabled. So in order to make it work with your local project setup, you can download the cacert.pem file from here - https://curl.se/docs/caextract.html. Then create a 'certificates' folder inside your wamp directory and place the cacert file inside the folder. Now you can edit your php.ini file and provide the cacert.pem file path for the "curl.cainfo" option. This will allow your local project also to make secure cURL call.
Guidance taken from: https://www.drupal.org/project/chatgpt_plugin →
- 🇯🇵Japan eleonel Itoshima 🇯🇵
Oh that could be yeah, please try to setup the project in your local with ddev or lando so you can have SSL and run it on your local.
In another issue I'm working in improving the error logging to catch problems like this one and provide more useful information to the user.
- Status changed to Closed: cannot reproduce
about 1 year ago 5:25pm 6 January 2024