cubex-hro / contao-openai-bundle

AI generated content for your Contao CMS project
MIT License
3 stars 3 forks source link

Error when using "title" or "description #6

Open markaba opened 1 month ago

markaba commented 1 month ago

No Result, no error message. Just in console: ...my-domain.com/_gpt?id=2&mode=title 500 (Internal Server Error)

Stack Trace from debug-Mode for this route:

ErrorException:
Warning: Trying to access array offset on value of type bool

  at vendor/cubex-hro/contao-openai-bundle/src/Classes/GptClass.php:42
  at Codebuster\ContaoOpenaiBundle\Classes\GptClass::prepareContent()
     (vendor/cubex-hro/contao-openai-bundle/src/Controller/GptController.php:33)
  at Codebuster\ContaoOpenaiBundle\Controller\GptController->__invoke()
     (vendor/symfony/http-kernel/HttpKernel.php:181)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:197)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/index.php:42)                
cubex-hro commented 5 days ago

can you check settings?

Looks like the request didn't work.

Do you set openai token and settings like discribed in readme ?